Skip to content

Commit

Permalink
Remove extra console logs and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SahilLamba0008 committed Nov 28, 2024
1 parent b75dfec commit 228c62c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 22 deletions.
17 changes: 0 additions & 17 deletions src/app/api/notesProgress/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,5 @@ export async function POST(req: NextRequest) {
});
}

// const updatedRecord = await db.notesProgress.upsert({
// where: {
// contentId_userId: {
// contentId: Number(contentId),
// userId: session.user.id,
// },
// },
// create: {
// contentId: Number(contentId),
// userId: session.user.id,
// isCompleted,
// },
// update: {
// isCompleted,
// },
// });

return NextResponse.json(updatedRecord);
}
1 change: 0 additions & 1 deletion src/components/CourseView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ export const CourseView = ({
} else if (x.type === 'video') {
contentCompletionStatus = x.videoProgress.markAsCompleted;
}
console.log("map");

return ({
title: x?.title || '',
Expand Down
1 change: 0 additions & 1 deletion src/components/FolderView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export const FolderView = ({
updatedRoute += `/${rest[i]}`;
}
// why? because we have to reset the segments or they will be visible always after a video
console.log(courseContent);
return (
<div>
<div className="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3">
Expand Down
3 changes: 0 additions & 3 deletions src/components/MarkCompletedButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@ export const MarkCompletedButton = ({
let contentCompletionStatus = false;
if (type === 'notion') {
contentCompletionStatus = notesProgress;
console.log("Notes :", notesProgress);
} else if (type === 'video') {
contentCompletionStatus = markAsCompleted;
console.log("Video :", markAsCompleted);
}
const [completed, setCompleted] = useState(contentCompletionStatus);
// console.log(courseContent);
const toggleCompletion = () => {
setCompleted((prev : boolean) => !prev);
};
Expand Down

0 comments on commit 228c62c

Please sign in to comment.