Skip to content

Commit

Permalink
Add translation in page component
Browse files Browse the repository at this point in the history
  • Loading branch information
emscb committed Apr 14, 2024
1 parent 521fdf5 commit e94029f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/common/Page/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import React from "react";
import "./style.scss";
import { Helmet } from "react-helmet";
import useTranslation from "utils/hooks/useTranslation";

const Page = ({ children, title }: React.HTMLAttributes<HTMLDivElement> & { title?: string }) => {
const t = useTranslation();

return (
<div className="cm-page">
<Helmet title={!title ? "파이콘 한국 2024" : `파이콘 한국 2024 | ${title}`} />
<Helmet title={!title ? `${t("파이콘 한국")} 2024` : `${t("파이콘 한국")} 2024 | ${title}`} />
{children}
</div>
);
Expand Down

0 comments on commit e94029f

Please sign in to comment.