@@ -2,7 +2,8 @@ import type { Metadata } from "next";
22import { notFound } from "next/navigation" ;
33
44import TopDetailNavigation from "@/components/layout/TopDetailNavigation" ;
5- import { HOME_UNIVERSITIES , HOME_UNIVERSITY_SLUG , type HomeUniversityName } from "@/types/university" ;
5+ import { HOME_UNIVERSITY_LIST , HOME_UNIVERSITY_SLUG_MAP } from "@/constants/university" ;
6+ import type { HomeUniversityName , HomeUniversitySlug } from "@/types/university" ;
67
78import SearchResultsContent from "./SearchResultsContent" ;
89
@@ -11,7 +12,7 @@ export const revalidate = false;
1112
1213// μ μ κ²½λ‘ μμ± (ISR)
1314export async function generateStaticParams ( ) {
14- return HOME_UNIVERSITIES . map ( ( university ) => ( {
15+ return HOME_UNIVERSITY_LIST . map ( ( university ) => ( {
1516 homeUniversityName : university . slug ,
1617 } ) ) ;
1718}
@@ -23,7 +24,7 @@ type PageProps = {
2324export async function generateMetadata ( { params } : PageProps ) : Promise < Metadata > {
2425 const { homeUniversityName } = await params ;
2526
26- const universityName = HOME_UNIVERSITY_SLUG [ homeUniversityName ] ;
27+ const universityName = HOME_UNIVERSITY_SLUG_MAP [ homeUniversityName as HomeUniversitySlug ] ;
2728
2829 if ( ! universityName ) {
2930 return {
@@ -40,7 +41,7 @@ export async function generateMetadata({ params }: PageProps): Promise<Metadata>
4041const UniversityListPage = async ( { params } : PageProps ) => {
4142 const { homeUniversityName } = await params ;
4243
43- const universityName = HOME_UNIVERSITY_SLUG [ homeUniversityName ] as HomeUniversityName | undefined ;
44+ const universityName = HOME_UNIVERSITY_SLUG_MAP [ homeUniversityName as HomeUniversitySlug ] as HomeUniversityName | undefined ;
4445
4546 if ( ! universityName ) {
4647 notFound ( ) ;
0 commit comments