Skip to content

Commit

Permalink
Merge pull request #588 from ohtutraininghub/470-fix-main-page
Browse files Browse the repository at this point in the history
470 fix main page
  • Loading branch information
rauhja authored Apr 18, 2024
2 parents 3686ff8 + c6f19eb commit 0126e71
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
15 changes: 1 addition & 14 deletions src/app/[lang]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,7 @@ export default async function HomePage({ searchParams, params }: Props) {
initialTags={tags}
lang={params.lang}
/>
<div
style={{
display: 'flex',
justifyContent: 'center',
alignItems: 'start',
flexDirection: 'column',
color: 'white',
}}
>
<h4>JSON.stringify(searchParams): {JSON.stringify(searchParams)}</h4>
<h4>courseId: {courseId}</h4>
<h4>openedCourse: {JSON.stringify(openedCourse)}</h4>
<h4>all course Ids: {courses.map((c) => c.id)}</h4>
</div>

{isTrainerOrAdmin(session.user) && <SpeedDialMenu />}
<CourseList
lang={params.lang}
Expand Down
1 change: 1 addition & 0 deletions src/components/Buttons/Buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export function CourseModalCloseButton({ lang }: CourseModalCloseButtonProps) {
const params = new URLSearchParams(searchParams);
params.delete('courseId');
router.replace(`${pathname}?${params}`);
router.refresh();
};

return (
Expand Down
1 change: 1 addition & 0 deletions src/components/CourseModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export default function CourseModal({
const params = new URLSearchParams(searchParams);
params.delete('courseId');
router.replace(`${pathname}?${params}`);
router.refresh();
}
};

Expand Down

0 comments on commit 0126e71

Please sign in to comment.