diff --git a/src/app/[lng]/mypage/MypageProfile.tsx b/src/app/[lng]/mypage/MypageProfile.tsx index ebaa86b0..0f01e623 100644 --- a/src/app/[lng]/mypage/MypageProfile.tsx +++ b/src/app/[lng]/mypage/MypageProfile.tsx @@ -8,14 +8,15 @@ interface MypageProfileProps { id?: string; phone?: string; email?: string; + logout?: string; + quit?: string; } const Account = ({ size, color }: IconProps) => { const sizeClass = size ? size : "h-6 w-6"; - // Define a CSS class for the SVG element color, or use a default value if not provided - const colorClass = color ? `text-${color}` : "text-gray-400"; // Use your preferred color clas + const colorClass = color ? `text-${color}` : "text-gray-400"; return ( { return ( -
+
{text}
); }; -const MypageProfile = ({ name, id, phone, email }: MypageProfileProps) => { +export default async function MypageProfile({ name, id, phone, email, logout='', quit=''}: MypageProfileProps) + +{ return (
-
+
INFO
-
+

{name}

-
+
{id}
-
+
{email}
- - + +
); }; - export default MypageProfile; \ No newline at end of file diff --git a/src/app/[lng]/mypage/MypageTable.tsx b/src/app/[lng]/mypage/MypageTable.tsx index f3d33c32..858fff4f 100644 --- a/src/app/[lng]/mypage/MypageTable.tsx +++ b/src/app/[lng]/mypage/MypageTable.tsx @@ -1,45 +1,62 @@ import LazyCat from "@/assets/lazy-cat.svg"; import dayjs from "dayjs"; -interface Tag { - id: number; - name: string; -} +// interface Tag { +// id: number; +// name: string; +// } interface NoticeBase { - id: number; + //id: number; title: string; - views: number; - body: string; - deadline: string | null; + //views: number; + //body: string; + //deadline: string | null; createdAt: string; - author: string; - tags: Tag[]; + //author: string; + //tags: Tag[]; } interface Notice extends NoticeBase { - imageUrl: string | null; + //imageUrl: string | null; } interface MypageTableProps { title: string; articles: Notice[]; link: string; + noArticle: string; + totalList: string; +} + +interface UnderLinedTextProps { + text: string; } -const MypageTable = ({ title, articles, link }: MypageTableProps) => { +const UnderLinedText = ({ text }: UnderLinedTextProps) => { + return ( +
+ {text} +
+ ); +}; + +const MypageTable = ({ + title, articles, link, noArticle, totalList }: MypageTableProps, + ) => { + return ( -
-
-
-
+
+
+
+
{title}
-
-
- 전체보기 +
+
+
@@ -51,17 +68,17 @@ const MypageTable = ({ title, articles, link }: MypageTableProps) => { return (
-
+
{articleObj.title}
-
+
{dayjs(articleObj.createdAt).format("YYYY-MM-DD")}
@@ -72,7 +89,7 @@ const MypageTable = ({ title, articles, link }: MypageTableProps) => {
- 아직 저장된 글이 없습니다. =ㅅ= + {noArticle}
)} @@ -81,4 +98,4 @@ const MypageTable = ({ title, articles, link }: MypageTableProps) => { ); }; -export default MypageTable; +export default MypageTable; \ No newline at end of file diff --git a/src/app/[lng]/mypage/page.tsx b/src/app/[lng]/mypage/page.tsx index e2cde0a9..ccf0eb95 100644 --- a/src/app/[lng]/mypage/page.tsx +++ b/src/app/[lng]/mypage/page.tsx @@ -2,18 +2,26 @@ import MypageProfile from "./MypageProfile"; import MypageSeperate from "./MypageSeperate"; import MypageTable from "./MypageTable"; import { useTranslation } from '@/app/i18next'; +import { Locale } from '../../i18next/settings'; + +export default async function MyPage({ + params: { lng }, +}: { + params: { lng: Locale }; +}) { + const { t } = await useTranslation(lng, 'translation'); -const MyPage = async () => { - const isSmall = false; - const isMobile = false; - return ( <>
@@ -23,14 +31,21 @@ const MyPage = async () => {
@@ -38,5 +53,4 @@ const MyPage = async () => { ); }; - - export default MyPage; \ No newline at end of file + \ No newline at end of file diff --git a/src/app/i18next/locales/en/translation.json b/src/app/i18next/locales/en/translation.json index 4511e202..d70ff65e 100644 --- a/src/app/i18next/locales/en/translation.json +++ b/src/app/i18next/locales/en/translation.json @@ -106,5 +106,14 @@ "academic": { "label": "📰 Academic Notices" } + }, + "mypage": { + "info": "INFO", + "myNotice": "List of My Notices", + "remindNotice": "List of Rminded Notices", + "totalList":"view all", + "logout":"logout", + "quit":"withdrawal", + "noArticle":"No article has been saved yet. =ㅅ=" } } \ No newline at end of file diff --git a/src/app/i18next/locales/ko/translation.json b/src/app/i18next/locales/ko/translation.json index f0202f04..8e44eebe 100644 --- a/src/app/i18next/locales/ko/translation.json +++ b/src/app/i18next/locales/ko/translation.json @@ -101,5 +101,14 @@ "academic": { "label": "📰 학사공지" } + }, + "mypage": { + "info": "정보", + "myNotice": "내가 게시한 공지 목록", + "remindNotice": "리마인드 설정한 게시물 목록", + "totalList":"전체보기", + "logout":"로그아웃", + "quit":"회원탈퇴", + "noArticle":"아직 저장된 글이 없습니다. =ㅅ=" } }