-
- {getHeaderLabel(pathname)}
-
+
+
{text}
{children}
);
diff --git a/src/ui/Profile/ProfileBookshelf/MyProfileBookshelfContainer.tsx b/src/v1/profile/bookShelf/MyProfileBookshelfContainer.tsx
similarity index 94%
rename from src/ui/Profile/ProfileBookshelf/MyProfileBookshelfContainer.tsx
rename to src/v1/profile/bookShelf/MyProfileBookshelfContainer.tsx
index 5a0a9ab7..6a374400 100644
--- a/src/ui/Profile/ProfileBookshelf/MyProfileBookshelfContainer.tsx
+++ b/src/v1/profile/bookShelf/MyProfileBookshelfContainer.tsx
@@ -1,5 +1,5 @@
import ProfileBookshelfPresenter from './ProfileBookshelfPresenter';
-import useMySummaryBookshlefQuery from '@/queries/bookshelf/useMySummaryBookshelfQuery';
+import useMySummaryBookshlefQuery from '@/queries/bookshelf/useMySummaryBookShelfQuery';
const MyProfileBookshelfContainer = () => {
const { isSuccess, data } = useMySummaryBookshlefQuery({
diff --git a/src/ui/Profile/ProfileBookshelf/index.tsx b/src/v1/profile/bookShelf/ProfileBookShelf.tsx
similarity index 68%
rename from src/ui/Profile/ProfileBookshelf/index.tsx
rename to src/v1/profile/bookShelf/ProfileBookShelf.tsx
index 1aedcccb..9082f9c8 100644
--- a/src/ui/Profile/ProfileBookshelf/index.tsx
+++ b/src/v1/profile/bookShelf/ProfileBookShelf.tsx
@@ -1,5 +1,4 @@
-import QueryErrorBounaryFallback from '@/ui/common/QueryErrorBoundaryFallback';
-import { Skeleton } from '@chakra-ui/react';
+import QueryErrorBoundaryFallback from '@/v1/base/QueryErrorBoundaryFallback';
import { QueryErrorResetBoundary } from '@tanstack/react-query';
import { Suspense } from 'react';
import { ErrorBoundary } from 'react-error-boundary';
@@ -7,6 +6,7 @@ import type { APIUser } from '@/types/user';
import MyProfileBookshelfContainer from './MyProfileBookshelfContainer';
import UserProfileBookshelfContainer from './UserProfileBookshelfContainer';
import useMounted from '@/hooks/useMounted';
+import Loading from '@/v1/base/Loading';
const ProfileBookShelf = ({ userId }: { userId: 'me' | APIUser['userId'] }) => {
const mounted = useMounted();
@@ -19,13 +19,12 @@ const ProfileBookShelf = ({ userId }: { userId: 'me' | APIUser['userId'] }) => {
(
-
)}
>
- }>
+ }>
{userId === 'me' ? (
) : (
@@ -40,6 +39,14 @@ const ProfileBookShelf = ({ userId }: { userId: 'me' | APIUser['userId'] }) => {
export default ProfileBookShelf;
-const ProfileBookShelfSkelenton = () => {
- return ;
+const ProfileBookShelfSkeleton = () => {
+ return (
+
+ );
};
diff --git a/src/v1/profile/bookShelf/ProfileBookshelfPresenter.tsx b/src/v1/profile/bookShelf/ProfileBookshelfPresenter.tsx
new file mode 100644
index 00000000..5dae0856
--- /dev/null
+++ b/src/v1/profile/bookShelf/ProfileBookshelfPresenter.tsx
@@ -0,0 +1,45 @@
+import { APIBookshelf } from '@/types/bookshelf';
+
+import Badge from '@/v1/base/Badge';
+import BookShelf from '@/v1/bookShelf/BookShelf';
+
+import { IconArrowRight, IconHeart } from '@public/icons';
+import Link from 'next/link';
+
+const ProfileBookshelfPresenter = ({
+ bookshelfId,
+ books,
+ likeCount,
+}: APIBookshelf) => {
+ return (
+
+ );
+};
+
+export default ProfileBookshelfPresenter;
diff --git a/src/ui/Profile/ProfileBookshelf/UserProfileBookshelfContainer.tsx b/src/v1/profile/bookShelf/UserProfileBookshelfContainer.tsx
similarity index 94%
rename from src/ui/Profile/ProfileBookshelf/UserProfileBookshelfContainer.tsx
rename to src/v1/profile/bookShelf/UserProfileBookshelfContainer.tsx
index 61484091..7b801756 100644
--- a/src/ui/Profile/ProfileBookshelf/UserProfileBookshelfContainer.tsx
+++ b/src/v1/profile/bookShelf/UserProfileBookshelfContainer.tsx
@@ -1,5 +1,5 @@
import ProfileBookshelfPresenter from './ProfileBookshelfPresenter';
-import useUserSummaryBookshlefQuery from '@/queries/bookshelf/useUserSummaryBookshelfQuery';
+import useUserSummaryBookshlefQuery from '@/queries/bookshelf/useUserSummaryBookShelfQuery';
import type { APIUser } from '@/types/user';
const UserProfileBookshelfContainer = ({
diff --git a/src/v1/profile/group/ProfileGroup.tsx b/src/v1/profile/group/ProfileGroup.tsx
new file mode 100644
index 00000000..131b9167
--- /dev/null
+++ b/src/v1/profile/group/ProfileGroup.tsx
@@ -0,0 +1,56 @@
+import useMounted from '@/hooks/useMounted';
+import { APIUser } from '@/types/user';
+import QueryErrorBoundaryFallback from '@/v1/base/QueryErrorBoundaryFallback';
+import { QueryErrorResetBoundary } from '@tanstack/react-query';
+import { Suspense } from 'react';
+import { ErrorBoundary } from 'react-error-boundary';
+import ProfileGroupContainer from './ProfileGroupContainer';
+
+const ProfileGroup = ({ userId }: { userId: 'me' | APIUser['userId'] }) => {
+ const mounted = useMounted();
+
+ if (!mounted) return null;
+
+ return (
+
+ {({ reset }) => (
+ (
+
+ )}
+ >
+ }>
+
+
+
+ )}
+
+ );
+};
+
+export default ProfileGroup;
+
+const ProfileGroupSkeleton = () => {
+ return (
+
+ );
+};
diff --git a/src/v1/profile/group/ProfileGroupContainer.tsx b/src/v1/profile/group/ProfileGroupContainer.tsx
new file mode 100644
index 00000000..77baa13b
--- /dev/null
+++ b/src/v1/profile/group/ProfileGroupContainer.tsx
@@ -0,0 +1,17 @@
+import useMyGroupsQuery from '@/queries/group/useMyGroupQuery';
+import { APIUser } from '@/types/user';
+import ProfileGroupPresenter from './ProfileGroupPresenter';
+
+const ProfileGroupContainer = ({
+ userId,
+}: {
+ userId: 'me' | APIUser['userId'];
+}) => {
+ const { isSuccess, data } = useMyGroupsQuery({ suspense: true });
+
+ if (!isSuccess) return null;
+
+ return ;
+};
+
+export default ProfileGroupContainer;
diff --git a/src/v1/profile/group/ProfileGroupPresenter.tsx b/src/v1/profile/group/ProfileGroupPresenter.tsx
new file mode 100644
index 00000000..38c99fae
--- /dev/null
+++ b/src/v1/profile/group/ProfileGroupPresenter.tsx
@@ -0,0 +1,41 @@
+import { APIGroup } from '@/types/group';
+import { APIUser } from '@/types/user';
+import SimpleBookGroupCard from '@/v1/bookGroup/SimpleBookGroupCard';
+import { IconArrowRight } from '@public/icons';
+import Link from 'next/link';
+
+interface ProfileGroupPresenterProps {
+ userId: 'me' | APIUser['userId'];
+ bookGroups: APIGroup[];
+}
+
+const ProfileGroupPresenter = ({
+ userId,
+ bookGroups,
+}: ProfileGroupPresenterProps) => {
+ return (
+
+
+
참여한 모임
+
+
+
+
+
+
+ {bookGroups.map(({ bookGroupId, title, book: { imageUrl } }) => (
+ -
+
+
+ ))}
+
+
+ );
+};
+
+export default ProfileGroupPresenter;
diff --git a/src/ui/Profile/ProfileInfo/MyProfileInfoContainer.tsx b/src/v1/profile/info/MyProfileInfoContainer.tsx
similarity index 100%
rename from src/ui/Profile/ProfileInfo/MyProfileInfoContainer.tsx
rename to src/v1/profile/info/MyProfileInfoContainer.tsx
diff --git a/src/ui/Profile/ProfileInfo/index.tsx b/src/v1/profile/info/ProfileInfo.tsx
similarity index 62%
rename from src/ui/Profile/ProfileInfo/index.tsx
rename to src/v1/profile/info/ProfileInfo.tsx
index 294ca743..d23b2120 100644
--- a/src/ui/Profile/ProfileInfo/index.tsx
+++ b/src/v1/profile/info/ProfileInfo.tsx
@@ -1,11 +1,10 @@
import { ReactNode, Suspense } from 'react';
import MyProfileContainer from './MyProfileInfoContainer';
import UserProfileInfoContainer from './UserProfileInfoContainer';
-import { Skeleton, SkeletonCircle, VStack } from '@chakra-ui/react';
import { QueryErrorResetBoundary } from '@tanstack/react-query';
import { ErrorBoundary } from 'react-error-boundary';
import type { APIUser } from '@/types/user';
-import QueryErrorBounaryFallback from '@/ui/common/QueryErrorBoundaryFallback';
+import QueryErrorBoundaryFallback from '@/v1/base/QueryErrorBoundaryFallback';
import useMounted from '@/hooks/useMounted';
type ProfileInfoProps = {
@@ -24,13 +23,12 @@ const ProfileInfo = ({ userId, children }: ProfileInfoProps) => {
(
-
)}
>
- }>
+ }>
{userId === 'me' ? (
) : (
@@ -46,11 +44,17 @@ const ProfileInfo = ({ userId, children }: ProfileInfoProps) => {
export default ProfileInfo;
-const ProfileInfoSkelenton = () => {
+const ProfileInfoSkeleton = () => {
return (
-
-
-
-
+
);
};
diff --git a/src/v1/profile/info/ProfileInfoPresenter.tsx b/src/v1/profile/info/ProfileInfoPresenter.tsx
new file mode 100644
index 00000000..5d0c6ee1
--- /dev/null
+++ b/src/v1/profile/info/ProfileInfoPresenter.tsx
@@ -0,0 +1,42 @@
+import type { APIUser } from '@/types/user';
+import Avatar from '@/v1/base/Avatar';
+import Badge from '@/v1/base/Badge';
+
+type ProfileInfoProps = Pick;
+
+const ProfileInfoPresenter = ({
+ nickname,
+ profileImage,
+ job: { jobGroupKoreanName, jobNameKoreanName },
+}: ProfileInfoProps) => {
+ return (
+
+
+
+ {jobGroupKoreanName}
+
+
+ {jobNameKoreanName}
+
+
+
+
+
+ {nickname}님의 공간
+
+
+
+ );
+};
+
+export default ProfileInfoPresenter;
diff --git a/src/ui/Profile/ProfileInfo/UserProfileInfoContainer.tsx b/src/v1/profile/info/UserProfileInfoContainer.tsx
similarity index 100%
rename from src/ui/Profile/ProfileInfo/UserProfileInfoContainer.tsx
rename to src/v1/profile/info/UserProfileInfoContainer.tsx