diff --git a/src/pages/dashboard/index.tsx b/src/pages/dashboard/index.tsx index d9bc23d2..7cee0518 100644 --- a/src/pages/dashboard/index.tsx +++ b/src/pages/dashboard/index.tsx @@ -251,14 +251,11 @@ export async function getServerSideProps( pageTitle += term + ', '; }); pageTitle = pageTitle.slice(0, -2) + (pageTitle.length > 0 ? ' - ' : ''); + document.title = pageTitle; return { props: { pageTitle: pageTitle } }; } -export const Dashboard: NextPage<{ pageTitle: string }> = ({ - pageTitle, -}: { - pageTitle: string; -}): React.ReactNode => { +export const Dashboard: NextPage = () => { const router = useRouter(); //Searches seperated into courses and professors to create combos @@ -817,7 +814,7 @@ export const Dashboard: NextPage<{ pageTitle: string }> = ({ ); } - pageTitle = ''; + let pageTitle = ''; courses.map((term) => { pageTitle += searchQueryLabel(term) + ', '; });