Skip to content

Commit

Permalink
Fix Sidebar Css
Browse files Browse the repository at this point in the history
  • Loading branch information
NayanPatidar committed Jul 1, 2024
1 parent 18eeb3f commit 5ddbd75
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/app/courses/[courseId]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const Layout = async ({
const fullCourseContent = await getFullCourseContent(parseInt(courseId, 10));

return (
<div className="flex h-full">
<div className="relative flex min-h-screen">
<Sidebar fullCourseContent={fullCourseContent} courseId={courseId[0]} />
<div className="no-scrollbar grow overflow-y-auto p-2">{children}</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export function Sidebar({
}

return (
<div className="w-84 sticky top-[64px] h-sidebar w-[300px] min-w-[300px] cursor-pointer self-start overflow-y-scroll bg-gray-50 dark:bg-gray-800">
<div className="absolute z-20 h-full w-[300px] min-w-[300px] cursor-pointer self-start overflow-y-scroll bg-gray-50 dark:bg-gray-800 sm:sticky sm:top-[64px] sm:h-sidebar">
<div className="flex">
{/* <ToggleButton
onClick={() => {
Expand Down
14 changes: 7 additions & 7 deletions src/db/course.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,13 @@ export const getFullCourseContent = async (
videoProgress:
content.type === 'video'
? {
duration: videoProgress.find((x) => x.contentId === content.id)
?.currentTimestamp,
markAsCompleted: videoProgress.find(
(x) => x.contentId === content.id,
)?.markAsCompleted,
videoFullDuration: content.VideoMetadata?.duration,
}
duration: videoProgress.find((x) => x.contentId === content.id)
?.currentTimestamp,
markAsCompleted: videoProgress.find(
(x) => x.contentId === content.id,
)?.markAsCompleted,
videoFullDuration: content.VideoMetadata?.duration,
}
: null,
},
]),
Expand Down
2 changes: 1 addition & 1 deletion src/utiles/appx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const LOCAL_CMS_PROVIDER = process.env.LOCAL_CMS_PROVIDER;
export async function getPurchases(email: string): Promise<Course[]> {
const value = await cache.get('courses', [email]);
if (value) {
console.log(value)
console.log(value);
return value;
}
const _courses = await getAllCoursesAndContentHierarchy();
Expand Down

0 comments on commit 5ddbd75

Please sign in to comment.