diff --git a/src/app/[lng]/mypage/MypageProfile.tsx b/src/app/[lng]/mypage/MypageProfile.tsx index 4510a6ab..220ff3f5 100644 --- a/src/app/[lng]/mypage/MypageProfile.tsx +++ b/src/app/[lng]/mypage/MypageProfile.tsx @@ -1,3 +1,6 @@ +import { createTranslation } from '@/app/i18next'; +import { Locale } from '@/app/i18next/settings'; + interface IconProps { size?: string; color?: string; @@ -49,9 +52,9 @@ export default async function MypageProfile({ id, phone, email, - logout = '', - quit = '', -}: MypageProfileProps) { + lng, +}: MypageProfileProps & { lng: Locale }) { + const { t } = await createTranslation(lng, 'translation'); return (
@@ -71,8 +74,8 @@ export default async function MypageProfile({
- - + +
diff --git a/src/app/[lng]/mypage/MypageTable.tsx b/src/app/[lng]/mypage/MypageTable.tsx index 232d2668..5c3e4e4d 100644 --- a/src/app/[lng]/mypage/MypageTable.tsx +++ b/src/app/[lng]/mypage/MypageTable.tsx @@ -1,5 +1,7 @@ import dayjs from 'dayjs'; +import { createTranslation } from '@/app/i18next'; +import { Locale } from '@/app/i18next/settings'; import LazyCat from '@/assets/lazy-cat.svg'; // interface Tag { @@ -26,8 +28,6 @@ interface MypageTableProps { title: string; articles: Notice[]; link: string; - noArticle: string; - totalList: string; } interface UnderLinedTextProps { @@ -40,13 +40,13 @@ const UnderLinedText = ({ text }: UnderLinedTextProps) => { ); }; -const MypageTable = ({ +const MypageTable = async ({ title, articles, link, - noArticle, - totalList, -}: MypageTableProps) => { + lng, +}: MypageTableProps & { lng: Locale }) => { + const { t } = await createTranslation(lng, 'translation'); return (
@@ -56,7 +56,7 @@ const MypageTable = ({
- +
@@ -92,7 +92,7 @@ const MypageTable = ({
- {noArticle} + {t('mypage.noArticle')}
)} diff --git a/src/app/[lng]/mypage/page.tsx b/src/app/[lng]/mypage/page.tsx index dcc6fbf6..15f64b7d 100644 --- a/src/app/[lng]/mypage/page.tsx +++ b/src/app/[lng]/mypage/page.tsx @@ -17,8 +17,7 @@ export default async function MyPage({