diff --git a/src/components/organisms/Header/Header.tsx b/src/components/organisms/Header/Header.tsx index 6729c23..0f99233 100644 --- a/src/components/organisms/Header/Header.tsx +++ b/src/components/organisms/Header/Header.tsx @@ -6,6 +6,7 @@ import styles from "./Header.module.scss"; import LanguageSwitcher from "@/components/molecules/LanguageSwitcher/LanguageSwitcher"; import logo from "@/assets/image/logo.png"; import { useRouter } from "@/navigation"; +import { baseUrl } from "@/constants/routes"; export default function Header() { const router = useRouter(); @@ -13,7 +14,7 @@ export default function Header() { const t = useTranslations(); const onClickLogo = (): void => { - router.push("/"); + router.push(baseUrl); }; return ( diff --git a/src/components/pages/Home/Home.tsx b/src/components/pages/Home/Home.tsx index f11ea7a..dfd58ca 100644 --- a/src/components/pages/Home/Home.tsx +++ b/src/components/pages/Home/Home.tsx @@ -12,6 +12,7 @@ import { useRouter } from "@/navigation"; import ImageGallery from "@/components/organisms/ImageGallery/ImageGallery"; import styles from "./Home.module.scss"; +import { exhibitUrl } from "@/constants/routes"; interface Props { exhibits: ITopLatestExhibit[]; @@ -45,7 +46,7 @@ export default function Home(props: Props): React.ReactElement { return; } - router.push(`exhibit/${exhibit.slug}`); + router.push(`${exhibitUrl}/${exhibit.slug}`); }; return ( diff --git a/src/constants/routes.ts b/src/constants/routes.ts new file mode 100644 index 0000000..bfc78dc --- /dev/null +++ b/src/constants/routes.ts @@ -0,0 +1,3 @@ +export const baseUrl = "/"; + +export const exhibitUrl = `/exhibit`;