-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: useTranslation -> createTranslation
- Loading branch information
1 parent
d98ed9e
commit f7bbc05
Showing
1 changed file
with
48 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,59 @@ | ||
import MypageProfile from "./MypageProfile"; | ||
import MypageSeperate from "./MypageSeperate"; | ||
import MypageTable from "./MypageTable"; | ||
import { useTranslation } from '@/app/i18next'; | ||
import { createTranslation } from '@/app/i18next'; | ||
|
||
import { Locale } from '../../i18next/settings'; | ||
import MypageProfile from './MypageProfile'; | ||
import MypageSeperate from './MypageSeperate'; | ||
import MypageTable from './MypageTable'; | ||
|
||
export default async function MyPage({ | ||
params: { lng }, | ||
}: { | ||
params: { lng: Locale }; | ||
}) { | ||
const { t } = await useTranslation(lng, 'translation'); | ||
|
||
return ( | ||
<> | ||
|
||
<div className={`mt-10 w-full flex h-1500 xl:h-1000 justify-center items-center flex-col xl:flex-row gap-20`}> | ||
<div className="flex flex-col relative m-10"> | ||
<MypageProfile | ||
logout={t('mypage.logout')} | ||
quit={t('mypage.quit')} | ||
const { t } = await createTranslation(lng, 'translation'); | ||
|
||
name={"김지현"} | ||
id={"201910808"} | ||
email={"ss@gm.gist.ac.kr"} | ||
phone={"010-0000-0000"}/> | ||
<div className="xl:flex hidden"> | ||
return ( | ||
<> | ||
<div | ||
className={`mt-10 w-full flex h-1500 xl:h-1000 justify-center items-center flex-col xl:flex-row gap-20`} | ||
> | ||
<div className="flex flex-col relative m-10"> | ||
<MypageProfile | ||
logout={t('mypage.logout')} | ||
quit={t('mypage.quit')} | ||
name={'김지현'} | ||
id={'201910808'} | ||
email={'ss@gm.gist.ac.kr'} | ||
phone={'010-0000-0000'} | ||
/> | ||
<div className="xl:flex hidden"> | ||
<MypageSeperate /> | ||
</div> | ||
</div> | ||
<div className={`flex justify-center items-center flex-col`}> | ||
<div className={`mb-10 p-0 xl:p-50`}> | ||
<MypageTable | ||
totalList={t('mypage.totalList')} | ||
noArticle={t('mypage.noArticle')} | ||
|
||
|
||
title={t('mypage.myNotice')} | ||
articles={[]} | ||
link={""} /> | ||
</div> | ||
<div className={`p-0 xl:p-50 `}> | ||
<MypageTable | ||
totalList={t('mypage.totalList')} | ||
noArticle={t('mypage.noArticle')} | ||
|
||
title={t('mypage.remindNotice')} | ||
articles={[{"title":"제목1","createdAt":"2021-09-01"},{"title":"제목2","createdAt":"2021-09-02"}]} | ||
link={""} /> | ||
</div> | ||
</div> | ||
</div> | ||
<div className={`flex justify-center items-center flex-col`}> | ||
<div className={`mb-10 p-0 xl:p-50`}> | ||
<MypageTable | ||
totalList={t('mypage.totalList')} | ||
noArticle={t('mypage.noArticle')} | ||
title={t('mypage.myNotice')} | ||
articles={[]} | ||
link={''} | ||
/> | ||
</div> | ||
<div className={`p-0 xl:p-50 `}> | ||
<MypageTable | ||
totalList={t('mypage.totalList')} | ||
noArticle={t('mypage.noArticle')} | ||
title={t('mypage.remindNotice')} | ||
articles={[ | ||
{ title: '제목1', createdAt: '2021-09-01' }, | ||
{ title: '제목2', createdAt: '2021-09-02' }, | ||
]} | ||
link={''} | ||
/> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
}; | ||
</div> | ||
</> | ||
); | ||
} |