diff --git a/src/components/PageLayout/MenuMain/MenuMain.tsx b/src/components/PageLayout/MenuMain/MenuMain.tsx index fc064f2c..fac0abe9 100644 --- a/src/components/PageLayout/MenuMain/MenuMain.tsx +++ b/src/components/PageLayout/MenuMain/MenuMain.tsx @@ -10,6 +10,7 @@ import {CloseButton} from '@/components/CloseButton/CloseButton' import {Loading} from '@/components/Loading/Loading' import Menu from '@/svg/menu.svg' import {MenuItemShort} from '@/types/api/cms' +import {useDataFromURL} from '@/utils/useDataFromURL' import {useHasPermissions} from '@/utils/useHasPermissions' import {useSeminarInfo} from '@/utils/useSeminarInfo' @@ -18,6 +19,7 @@ import styles from './MenuMain.module.scss' export const MenuMain: FC = () => { const {seminar, seminarId} = useSeminarInfo() + const {id} = useDataFromURL() const {hasPermissions} = useHasPermissions() @@ -72,7 +74,7 @@ export const MenuMain: FC = () => { {hasPermissions && ( - + )} diff --git a/src/components/SemesterPicker/SemesterPicker.tsx b/src/components/SemesterPicker/SemesterPicker.tsx index 98950af4..487f6d3e 100644 --- a/src/components/SemesterPicker/SemesterPicker.tsx +++ b/src/components/SemesterPicker/SemesterPicker.tsx @@ -12,7 +12,6 @@ interface SeriesListItem { order: number deadline: string complete: boolean - frozen_results: string | null semester: number } diff --git a/src/utils/PageTitleContainer.tsx b/src/utils/PageTitleContainer.tsx index e20a2d42..b58d9ad7 100644 --- a/src/utils/PageTitleContainer.tsx +++ b/src/utils/PageTitleContainer.tsx @@ -1,8 +1,14 @@ import {useState} from 'react' import {createContainer} from 'unstated-next' +import {useUpdateEffect} from 'usehooks-ts' const usePageTitle = (initial = '') => { const [pageTitle, setPageTitle] = useState(initial) + + useUpdateEffect(() => { + setPageTitle(initial) + }, [initial]) + return {pageTitle, setPageTitle} }