diff --git a/src/app/(Sub)/detail/[id]/components/Source.tsx b/src/app/(Sub)/detail/[id]/Source.tsx
similarity index 100%
rename from src/app/(Sub)/detail/[id]/components/Source.tsx
rename to src/app/(Sub)/detail/[id]/Source.tsx
diff --git a/src/app/(Sub)/detail/[id]/components/TagButton.tsx b/src/app/(Sub)/detail/[id]/TagButton.tsx
similarity index 100%
rename from src/app/(Sub)/detail/[id]/components/TagButton.tsx
rename to src/app/(Sub)/detail/[id]/TagButton.tsx
diff --git a/src/app/(Sub)/detail/[id]/components/LinkShareModal.tsx b/src/app/(Sub)/detail/[id]/components/LinkShareModal.tsx
deleted file mode 100644
index a32daafb..00000000
--- a/src/app/(Sub)/detail/[id]/components/LinkShareModal.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import { PrimaryButton } from '@/components/Button';
-import { Modal } from '@/components/Modal';
-import { Spacing } from '@/components/Spacing';
-
-interface LinkShareModalProps {
- onClose: () => void;
-}
-export default function LinkShareModal({ onClose }: LinkShareModalProps) {
- return (
-
- );
-}
diff --git a/src/app/(Sub)/detail/[id]/page.tsx b/src/app/(Sub)/detail/[id]/page.tsx
index 8024bf7f..44136648 100644
--- a/src/app/(Sub)/detail/[id]/page.tsx
+++ b/src/app/(Sub)/detail/[id]/page.tsx
@@ -1,10 +1,10 @@
import { QueryAsyncBoundary } from '@suspensive/react-query';
import { Metadata, ResolvingMetadata } from 'next';
-import DetailSection from './components/DetailSection';
+import DetailSection from './DetailSection';
import { getPoseDetail } from '@/apis';
import { RejectedFallback } from '@/components/ErrorBoundary';
-import { DetailHeader } from '@/components/Header';
+import Header from '@/components/Header';
import { Loading } from '@/components/Loading';
import { PageAnimation } from '@/components/PageAnimation';
import { HydrationProvider } from '@/components/Provider/HydrationProvider';
@@ -35,7 +35,7 @@ export default function DetailPage({ params }: { params: { id: number } }) {
return (
-
+
}
diff --git a/src/app/(Sub)/layout.tsx b/src/app/(Sub)/layout.tsx
deleted file mode 100644
index dc6431c8..00000000
--- a/src/app/(Sub)/layout.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import { Spacing } from '@/components/Spacing';
-import { StrictPropsWithChildren } from '@/types';
-
-export default function SubLayout({ children }: StrictPropsWithChildren) {
- return (
- <>
-
- {children}
- >
- );
-}
diff --git a/src/app/(Sub)/menu/MenuListSection.tsx b/src/app/(Sub)/menu/MenuListSection.tsx
new file mode 100644
index 00000000..61b908ca
--- /dev/null
+++ b/src/app/(Sub)/menu/MenuListSection.tsx
@@ -0,0 +1,47 @@
+'use client';
+
+import Link from 'next/link';
+
+import LogoutModal from '@/components/Login/LogoutModal';
+import { useOverlay } from '@/components/Overlay/useOverlay';
+import { menuList } from '@/constants/data';
+import useUserState from '@/context/userState';
+
+export default function MenuListSection() {
+ const { isLogin } = useUserState();
+ const { open } = useOverlay();
+
+ function handleLogout() {
+ open(({ exit }) =>
);
+ }
+
+ return (
+
+ {menuList.map((item, idx) =>
+ item.text ? (
+ window.open(item.link)}
+ >
+ {item.text}
+
+ ) : (
+
+ )
+ )}
+ {isLogin && (
+ <>
+
+ 로그아웃
+
+
+
+ 탈퇴하기
+
+
+ >
+ )}
+
+ );
+}
diff --git a/src/app/(Sub)/menu/components/LoginModal.tsx b/src/app/(Sub)/menu/components/LoginModal.tsx
deleted file mode 100644
index 422ea013..00000000
--- a/src/app/(Sub)/menu/components/LoginModal.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { AppleButton, KakaoButton } from './LoginButton';
-import { Modal } from '@/components/Modal';
-import { Spacing } from '@/components/Spacing';
-import { BASE_SITE_URL, KAKAO_SERVER_KEY } from '@/constants/env';
-
-interface LoginModalProps {
- onClose: () => void;
-}
-
-export default function LoginModal({ onClose }: LoginModalProps) {
- const link = `https://kauth.kakao.com/oauth/authorize?client_id=${KAKAO_SERVER_KEY}&redirect_uri=${BASE_SITE_URL}/api/users/login/oauth/kakao&response_type=code`;
-
- const handleLogin = () => {
- window.location.href = link;
- };
-
- return (
-
-
-
간편 로그인
-
-
- 로그인하면 북마크도 쓸 수 있어요!
-
- 간편 로그인으로 3초만에 가입해요.
-
-
-
-
-
alert('앱스토어 준비중입니다.')} />
-
-
- );
-}
diff --git a/src/app/(Sub)/menu/components/LoginSection.tsx b/src/app/(Sub)/menu/components/LoginSection.tsx
deleted file mode 100644
index d2b1bf23..00000000
--- a/src/app/(Sub)/menu/components/LoginSection.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-'use client';
-
-import { useRecoilValue } from 'recoil';
-
-import LoginModal from './LoginModal';
-import { Icon } from '@/components/Button/Icon';
-import { PreparingModal } from '@/components/Modal';
-import { useOverlay } from '@/components/Overlay/useOverlay';
-import { Spacing } from '@/components/Spacing';
-import { ICON } from '@/constants/icon';
-import { isLoginAtom, userAtom } from '@/context/userState';
-
-function DefaultProfile() {
- return (
-
-
-
- );
-}
-
-export default function LoginSection() {
- const { open, exit } = useOverlay();
-
- const isLogin = useRecoilValue(isLoginAtom);
- // const userData = useRecoilValue(userAtom);
- // console.log('🚀 ~ LoginSection ~ userData:', userData);
-
- return (
-
- {isLogin ? (
-
-
-
- (개발중) 로그인 완료
-
- ) : (
-
- )}
-
- );
-}
diff --git a/src/app/(Sub)/menu/components/MakerSection.tsx b/src/app/(Sub)/menu/components/MakerSection.tsx
deleted file mode 100644
index 23d470fe..00000000
--- a/src/app/(Sub)/menu/components/MakerSection.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-'use client';
-
-import { Icon } from '@/components/Button';
-import { BottomFixedDiv } from '@/components/Button/BottomFixedDiv';
-import { Spacing } from '@/components/Spacing';
-
-export default function MakerSection() {
- return (
-
-
-
-
-
-
-
-
-
-
-
- );
-}
diff --git a/src/app/(Sub)/menu/components/MenuListSection.tsx b/src/app/(Sub)/menu/components/MenuListSection.tsx
deleted file mode 100644
index da1d6cf9..00000000
--- a/src/app/(Sub)/menu/components/MenuListSection.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-'use client';
-
-import { URL } from '@/constants/url';
-
-const MenuList = [
- { text: '공지사항', link: URL.menu.notice },
- { text: '자주 묻는 질문', link: URL.menu.faq },
- { text: '문의하기', link: URL.inquiry },
- { text: '', link: '' },
- { text: '이용약관', link: URL.menu.term },
- { text: '개인정보 처리방침', link: URL.menu.privacy },
-] as const;
-
-export default function MenuListSection() {
- return (
-
- {MenuList.map((item, idx) =>
- item.text ? (
- window.open(item.link)}>
- {item.text}
-
- ) : (
-
- )
- )}
-
- );
-}
diff --git a/src/app/(Sub)/menu/page.tsx b/src/app/(Sub)/menu/page.tsx
index 49b875b7..0ce11ff0 100644
--- a/src/app/(Sub)/menu/page.tsx
+++ b/src/app/(Sub)/menu/page.tsx
@@ -1,15 +1,15 @@
-import LoginSection from './components/LoginSection';
-import MakerSection from './components/MakerSection';
-import MenuListSection from './components/MenuListSection';
-import { MenuHeader } from '@/components/Header';
+'use client';
+
+import MenuListSection from './MenuListSection';
+import Header from '@/components/Header';
+import LoginSection from '@/components/Login/LoginSection';
export default function MenuPage() {
return (
-
+
-
);
}
diff --git a/src/app/(Sub)/menu/withdraw/page.tsx b/src/app/(Sub)/menu/withdraw/page.tsx
new file mode 100644
index 00000000..bd46e348
--- /dev/null
+++ b/src/app/(Sub)/menu/withdraw/page.tsx
@@ -0,0 +1,97 @@
+'use client';
+
+import { useRouter } from 'next/navigation';
+import { useState } from 'react';
+
+import { BottomFixedDiv, PrimaryButton } from '@/components/Button';
+import Header from '@/components/Header';
+import { Popup } from '@/components/Modal';
+import { useOverlay } from '@/components/Overlay/useOverlay';
+import { withdrawReasonList } from '@/constants/data';
+
+const RadioInput = ({ checked }: { checked: boolean }) => {
+ return checked ? (
+
+ ) : (
+
+ );
+};
+
+export default function Page() {
+ const [withdrawalReason, setWithdrawalReason] = useState
();
+ const [etc, setEtc] = useState(false);
+ const { open } = useOverlay();
+ const router = useRouter();
+
+ function handleWithdraw() {
+ open(({ exit }) => (
+
+ <>
+
+ router.replace(`/auth/withdraw?reason=${withdrawalReason}`)}
+ type="warning"
+ />
+ >
+
+ ));
+ }
+
+ return (
+ <>
+
+
+
+ 떠나시는 이유를
+
+ 알려줄 수 있나요?
+
+
+ {etc && (
+
+
+ router.back()} />
+ {withdrawalReason ? (
+
+ ) : (
+
+ )}
+
+ >
+ );
+}
diff --git a/src/app/auth/logout/page.tsx b/src/app/auth/logout/page.tsx
new file mode 100644
index 00000000..eeb73d7c
--- /dev/null
+++ b/src/app/auth/logout/page.tsx
@@ -0,0 +1,25 @@
+'use client';
+
+import { useRouter } from 'next/navigation';
+import { useEffect } from 'react';
+
+import { patchLogout } from '@/apis';
+import useUserState from '@/context/userState';
+
+export default function Page() {
+ const { token, clearUser } = useUserState();
+ const router = useRouter();
+
+ useEffect(() => {
+ if (token) {
+ patchLogout(token.accessToken, token.refreshToken).then(() => {
+ alert('로그아웃 되었습니다');
+ });
+ }
+ clearUser();
+ localStorage.removeItem('accesstoken');
+ router.back();
+ });
+
+ return;
+}
diff --git a/src/app/auth/page.tsx b/src/app/auth/page.tsx
new file mode 100644
index 00000000..f03ad85c
--- /dev/null
+++ b/src/app/auth/page.tsx
@@ -0,0 +1,26 @@
+'use client';
+
+import { useRouter, useSearchParams } from 'next/navigation';
+import { useEffect } from 'react';
+
+import { getRegister } from '@/apis';
+import useUserState from '@/context/userState';
+
+export default function Page() {
+ const code = useSearchParams().get('code');
+ const { setUser } = useUserState();
+ const router = useRouter();
+
+ useEffect(() => {
+ if (code) {
+ getRegister(code).then((response) => {
+ setUser(response);
+ localStorage.setItem('accesstoken', response.token.accessToken);
+ alert(`로그인에 성공했어요!`);
+ router.replace('/menu');
+ });
+ }
+ });
+
+ return;
+}
diff --git a/src/app/auth/withdraw/page.tsx b/src/app/auth/withdraw/page.tsx
new file mode 100644
index 00000000..1330a723
--- /dev/null
+++ b/src/app/auth/withdraw/page.tsx
@@ -0,0 +1,34 @@
+'use client';
+
+import { useRouter, useSearchParams } from 'next/navigation';
+import { useEffect } from 'react';
+
+import { patchDeleteAccount, patchLogout } from '@/apis';
+import useUserState from '@/context/userState';
+
+export default function Page() {
+ const router = useRouter();
+ const { token, clearUser } = useUserState();
+ const withdrawalReason = useSearchParams().get('reason');
+
+ useEffect(() => {
+ if (token && withdrawalReason) {
+ patchDeleteAccount(token.accessToken, token.refreshToken, withdrawalReason).then(
+ (response) => {
+ console.log(response);
+ }
+ );
+ }
+ // 회원탈퇴 api 될 떄 까지만
+ // if (token) {
+ // patchLogout(token.accessToken, token.refreshToken).then(() => {
+ // alert('로그아웃 되었습니다');
+ // });
+ // }
+ clearUser();
+ localStorage.removeItem('accesstoken');
+ router.replace('/menu');
+ });
+
+ return;
+}
diff --git a/src/app/globals.css b/src/app/globals.css
index dfdd86ca..7601d482 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -3,9 +3,6 @@
@tailwind utilities;
* {
- box-sizing: border-box;
- -ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
- scrollbar-width: none; /* Hide scrollbar for Firefox */
font-family: Pretendard;
white-space: pre-wrap;
}
@@ -20,31 +17,30 @@
}
}
-@supports (-webkit-touch-callout: none) {
- .h-screen {
- height: -webkit-fill-available;
- }
-}
/* Font */
@font-face {
font-family: 'Pretendard';
- font-weight: 700;
- src: url('/fonts/Pretendard-Bold.woff2') format('woff2');
+ src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Regular.woff') format('woff');
+ font-weight: 400;
+ font-style: normal;
}
@font-face {
font-family: 'Pretendard';
+ src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Medium.woff') format('woff');
font-weight: 500;
- src: url('/fonts/Pretendard-Medium.woff2') format('woff2');
+ font-style: normal;
}
@font-face {
font-family: 'Pretendard';
- font-weight: 400;
- src: url('/fonts/Pretendard-Regular.woff2') format('woff2');
+ src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Bold.woff') format('woff');
+ font-weight: 700;
+ font-style: normal;
}
+
/* Typography */
h1 {
font-weight: 700;
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index cbf2293c..e9ada8d2 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -6,7 +6,7 @@ import { Analytics } from '@/components/Analytics';
import { OverlayProvider } from '@/components/Overlay/OverlayProvider';
import { META_STRING } from '@/constants/meta';
import QueryProvider from '@/provider/QueryProvider';
-import RecoilContextProvider from '@/provider/RecoilContextProvider';
+import RecoilProvider from '@/provider/RecoilProvider';
import type { Metadata } from 'next';
@@ -17,11 +17,10 @@ export const metadata: Metadata = {
},
description: META_STRING.description.main,
verification: {
- google: 'MB7qV_Oa4G4gR0jHgjtnE6S4g4blocE2mjo7z-z2f6Q',
+ google: META_STRING.verification.google,
},
other: {
- 'naver-site-verification': 'eb9f471cae26de34e6bc71849e73f04cb8b00d83',
- 'last-updated': '2023-11-08',
+ 'naver-site-verification': META_STRING.verification.naver,
},
openGraph: {
title: META_STRING.title,
@@ -50,17 +49,17 @@ export const metadata: Metadata = {
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
-
+
-
-
+
+
{children}
-
-
-
+
+
+
diff --git a/src/components/Button/BottomFixedDiv.tsx b/src/components/Button/BottomFixedDiv.tsx
index cb15d084..93e3454b 100644
--- a/src/components/Button/BottomFixedDiv.tsx
+++ b/src/components/Button/BottomFixedDiv.tsx
@@ -1,12 +1,12 @@
import { StrictPropsWithChildren } from '@/types';
export function ButtonList({ children }: StrictPropsWithChildren) {
- return {children}
;
+ return {children}
;
}
export function BottomDiv({ children }: StrictPropsWithChildren) {
return (
-
+
{children}
);
@@ -14,8 +14,11 @@ export function BottomDiv({ children }: StrictPropsWithChildren) {
export function BottomFixedDiv({ children }: StrictPropsWithChildren) {
return (
-
- {children}
-
+ <>
+
+ {children}
+
+
+ >
);
}
diff --git a/src/components/Button/PrimaryButton.tsx b/src/components/Button/PrimaryButton.tsx
index cf41e326..0238421a 100644
--- a/src/components/Button/PrimaryButton.tsx
+++ b/src/components/Button/PrimaryButton.tsx
@@ -8,22 +8,20 @@ interface Button {
className?: string;
}
-interface Style {
- fill: string;
- outline: string;
- secondary: string;
-}
+type Style = { [key: string]: string };
+
const style: Style = {
fill: `bg-main-violet text-white`,
outline: `border-1 border-main-violet text-main-violet bg-main-violet-base`,
secondary: `bg-sub-white text-secondary w-fit`,
+ warning: `bg-warning text-white`,
};
export default function PrimaryButton({ icon, text, onClick, type = 'fill', className }: Button) {
return (
);
}
diff --git a/src/components/Feed/EmptyCase.tsx b/src/components/Feed/EmptyCase.tsx
index 71ccd258..75eb27e9 100644
--- a/src/components/Feed/EmptyCase.tsx
+++ b/src/components/Feed/EmptyCase.tsx
@@ -1,29 +1,20 @@
-import Link from 'next/link';
+import { PropsWithChildren } from 'react';
-import { PrimaryButton } from '@/components/Button';
import { Spacing } from '@/components/Spacing';
-interface EmptyCase {
+interface EmptyCase extends PropsWithChildren {
title: string;
text: string;
- button: string;
- path: string;
}
-export default function EmptyCase(props: EmptyCase) {
- const { title, text, button, path } = props;
-
+export default function EmptyCase({ title, text, children }: EmptyCase) {
return (
{title}
{text}
-
+
{children}
);
}
diff --git a/src/components/Feed/FeedSection.tsx b/src/components/Feed/FeedSection.tsx
new file mode 100644
index 00000000..c30b9691
--- /dev/null
+++ b/src/components/Feed/FeedSection.tsx
@@ -0,0 +1,69 @@
+'use client';
+
+import { UseSuspenseInfiniteQueryResultOnSuccess } from '@suspensive/react-query';
+import { PropsWithChildren, useEffect } from 'react';
+import { useInView } from 'react-intersection-observer';
+
+import { PoseFeedContents, PoseFeedResponse } from '@/apis';
+import PhotoList from '@/components/Feed/PhotoList';
+
+interface FeedSecionI extends PropsWithChildren {
+ query: UseSuspenseInfiniteQueryResultOnSuccess
;
+}
+
+export default function FeedSection({ children, query }: FeedSecionI) {
+ const { ref, inView } = useInView();
+ const { data, fetchNextPage, refetch } = query;
+
+ useEffect(() => {
+ refetch();
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, []);
+
+ useEffect(() => {
+ if (inView) fetchNextPage();
+ }, [inView, fetchNextPage]);
+
+ if ('filteredContents' in data.pages[0])
+ return (
+
+ {data.pages[0].filteredContents.empty ? (
+ children
+ ) : (
+
+ {data.pages.map((page) => {
+ const poseListData = 'filteredContents' in page ? page.filteredContents : page;
+ return
;
+ })}
+
+ )}
+ {data.pages[0]?.recommendation && (
+ <>
+
이런 포즈는 어때요?
+
+ {data.pages.map((page) => {
+ const poseListData =
+ 'recommendedContents' in page ? page.recommendedContents : page;
+ return
;
+ })}
+
+ >
+ )}
+
+
+ );
+ return (
+
+ {data.pages[0].empty ? (
+ children
+ ) : (
+
+ {data.pages.map(
+ (page) => 'content' in page &&
+ )}
+
+ )}
+
+
+ );
+}
diff --git a/src/components/Feed/Photo.tsx b/src/components/Feed/Photo.tsx
index dc7d46fa..adea6547 100644
--- a/src/components/Feed/Photo.tsx
+++ b/src/components/Feed/Photo.tsx
@@ -1,24 +1,44 @@
-import Link from 'next/link';
+'use client';
+
+import Image from 'next/image';
+import { useRouter } from 'next/navigation';
+import { useState } from 'react';
import BookmarkButton from './BookmarkButton';
interface Photo {
imageKey?: string;
source?: string;
- id?: number;
+ id: number;
+ isMarked: boolean;
}
-export default function Photo({ imageKey, source, id }: Photo) {
+export default function Photo({ imageKey, source, id, isMarked }: Photo) {
+ const [loaded, setLoaded] = useState(false);
+ const router = useRouter();
+
return (
-
-
- {imageKey && (
- <>
-
-
- >
- )}
-
-
+
+ {imageKey && (
+ <>
+
setLoaded(true)}
+ onClick={() => router.push(`/detail/${id}`)}
+ />
+ {loaded && }
+ {loaded || }
+ >
+ )}
+
);
}
diff --git a/src/components/Feed/PhotoList.tsx b/src/components/Feed/PhotoList.tsx
index aa6a293d..f99e237c 100644
--- a/src/components/Feed/PhotoList.tsx
+++ b/src/components/Feed/PhotoList.tsx
@@ -1,20 +1,21 @@
-import { PoseInfo } from '@/apis';
import Photo from './Photo';
+import { PoseFeedContents } from '@/apis';
interface PhotoList {
- data?: Array<{ poseInfo: PoseInfo }>;
+ data?: PoseFeedContents;
}
export default function PhotoList({ data }: PhotoList) {
- if (!data) return ;
+ if (!data) return;
return (
<>
- {data.map((item) => (
+ {data.content.map((item) => (
))}
>
diff --git a/src/app/(Main)/feed/components/FilterTab.tsx b/src/components/Header/FilterTab.tsx
similarity index 100%
rename from src/app/(Main)/feed/components/FilterTab.tsx
rename to src/components/Header/FilterTab.tsx
diff --git a/src/components/Header/CloseButton.tsx b/src/components/Header/HeaderButton.tsx
similarity index 53%
rename from src/components/Header/CloseButton.tsx
rename to src/components/Header/HeaderButton.tsx
index 5c50fc8e..9a039a2d 100644
--- a/src/components/Header/CloseButton.tsx
+++ b/src/components/Header/HeaderButton.tsx
@@ -5,16 +5,27 @@ import { useRouter } from 'next/navigation';
import { IconButton } from '../Button';
import { ICON } from '@/constants/icon';
-export default function CloseButton() {
+export function CloseButton() {
const router = useRouter();
-
return (
{
- if (document.referrer) router.back();
+ if (window.history.length > 1) router.back();
else router.replace('/feed');
}}
/>
);
}
+
+export function MenuButton() {
+ const router = useRouter();
+ return (
+ {
+ router.push('/menu');
+ }}
+ />
+ );
+}
diff --git a/src/components/Header/MainHeader.tsx b/src/components/Header/MainHeader.tsx
new file mode 100644
index 00000000..bf46071d
--- /dev/null
+++ b/src/components/Header/MainHeader.tsx
@@ -0,0 +1,28 @@
+'use client';
+
+import { usePathname } from 'next/navigation';
+
+import Header from '.';
+import FilterTab from './FilterTab';
+import MyposeTab from './MyposeTab';
+import Tab from './Tab';
+import { Spacing } from '../Spacing';
+
+export default function MainHeader() {
+ const curPath = usePathname();
+ const isFeedPage = curPath.includes('/feed');
+ const isMyposePage = curPath.includes('/mypose');
+
+ return (
+ <>
+
+ {isFeedPage && }
+ {isMyposePage && }
+
+
+ {isFeedPage && }
+ {isMyposePage && }
+
+ >
+ );
+}
diff --git a/src/components/Header/MyposeTab.tsx b/src/components/Header/MyposeTab.tsx
new file mode 100644
index 00000000..413e92a4
--- /dev/null
+++ b/src/components/Header/MyposeTab.tsx
@@ -0,0 +1,47 @@
+'use client';
+
+import Link from 'next/link';
+import { usePathname } from 'next/navigation';
+
+const MyposeTabData = [
+ { title: '등록', path: '/mypose' },
+ { title: '저장', path: '/mypose/bookmark' },
+];
+
+interface TabItemI {
+ title: string;
+ path: string;
+ current: boolean;
+}
+const TabItem = ({ title, path, current }: TabItemI) =>
+ current ? (
+
+
+ {title}
+
+
+ ) : (
+
+
+ {title}
+
+
+ );
+
+export default function MyposeTab() {
+ const path = usePathname();
+ return (
+
+
+ {MyposeTabData.map((item) => (
+
+ ))}
+
+
+ );
+}
diff --git a/src/components/Header/Tab.tsx b/src/components/Header/Tab.tsx
index 2a9419c8..d95ed03a 100644
--- a/src/components/Header/Tab.tsx
+++ b/src/components/Header/Tab.tsx
@@ -1,6 +1,5 @@
'use client';
-import { motion } from 'framer-motion';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
@@ -8,24 +7,22 @@ const tabData = [
{ path: '/pick', title: '포즈픽' },
{ path: '/talk', title: '포즈톡' },
{ path: '/feed', title: '포즈피드' },
-];
+ { path: '/mypose/bookmark', title: '마이포즈' },
+] as const;
export default function Tab() {
- const path = usePathname();
+ const curPath = usePathname();
return (