From bba56dbc84afb8e2e1a5d8f3df5506e32cb24ee9 Mon Sep 17 00:00:00 2001 From: hoxey2react Date: Mon, 30 Jun 2025 17:19:54 +0900 Subject: [PATCH 1/9] =?UTF-8?q?refactor:=20=EC=83=81=EC=9C=84=EC=9A=94?= =?UTF-8?q?=EC=86=8C=EC=97=90=EB=A7=8C=20use=20client,=20=EB=82=98?= =?UTF-8?q?=EB=A8=B8=EC=A7=80=EB=8A=94=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mypage/_components/my-profile/EditMyProfileForm.tsx | 2 -- src/app/mypage/_components/my-profile/InputController.tsx | 2 -- src/app/mypage/_components/my-profile/MyProfile.tsx | 6 ++++-- .../my-social-list/MySocialListCardItemGeneral.tsx | 2 -- .../_components/my-social-list/MySocialListItemLiked.tsx | 2 -- src/app/mypage/page.tsx | 8 -------- 6 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/app/mypage/_components/my-profile/EditMyProfileForm.tsx b/src/app/mypage/_components/my-profile/EditMyProfileForm.tsx index 93091f98..d4f4de5a 100644 --- a/src/app/mypage/_components/my-profile/EditMyProfileForm.tsx +++ b/src/app/mypage/_components/my-profile/EditMyProfileForm.tsx @@ -1,5 +1,3 @@ -'use client'; - import Button from '@/components/common/Button/Button'; import { MyInfoRequest } from '@/api/auth/type'; import { diff --git a/src/app/mypage/_components/my-profile/InputController.tsx b/src/app/mypage/_components/my-profile/InputController.tsx index 77b26950..238abcd0 100644 --- a/src/app/mypage/_components/my-profile/InputController.tsx +++ b/src/app/mypage/_components/my-profile/InputController.tsx @@ -1,5 +1,3 @@ -'use client'; - import InputForm from '@/components/common/Form/InputForm'; import { Control, Controller, FieldValues, Path } from 'react-hook-form'; diff --git a/src/app/mypage/_components/my-profile/MyProfile.tsx b/src/app/mypage/_components/my-profile/MyProfile.tsx index 80901433..67222ed5 100644 --- a/src/app/mypage/_components/my-profile/MyProfile.tsx +++ b/src/app/mypage/_components/my-profile/MyProfile.tsx @@ -3,9 +3,11 @@ import Image from 'next/image'; import useBoolean from '@/hooks/useBoolean'; import { BtnEditLarge, DefaultProfileImage } from '@public/assets/icons'; -import { useAuth } from '@/providers/auth-provider/AuthProvider.client'; import EditMyProfileForm from './EditMyProfileForm'; import MyProfileSkeleton from './MyProfileSkeleton'; +import { useAuth } from '@/providers/auth-provider/AuthProvider.client'; +import { redirect } from 'next/navigation'; +import { APP_ROUTES } from '@/constants/appRoutes'; const MyProfile = () => { const { @@ -15,8 +17,8 @@ const MyProfile = () => { } = useBoolean(); const { myInfo, isSignIn, queryMethods } = useAuth(); + if (!isSignIn || !myInfo) return redirect(APP_ROUTES.signin); - if (!isSignIn || !myInfo) return; if (queryMethods.isLoading) return ; return ( diff --git a/src/app/mypage/_components/my-social-list/MySocialListCardItemGeneral.tsx b/src/app/mypage/_components/my-social-list/MySocialListCardItemGeneral.tsx index 10048071..81166127 100644 --- a/src/app/mypage/_components/my-social-list/MySocialListCardItemGeneral.tsx +++ b/src/app/mypage/_components/my-social-list/MySocialListCardItemGeneral.tsx @@ -1,5 +1,3 @@ -'use client'; - import { deleteCollaboratorFromSocial, leaveJoinSocial, diff --git a/src/app/mypage/_components/my-social-list/MySocialListItemLiked.tsx b/src/app/mypage/_components/my-social-list/MySocialListItemLiked.tsx index 0e6af6df..0ab42ab2 100644 --- a/src/app/mypage/_components/my-social-list/MySocialListItemLiked.tsx +++ b/src/app/mypage/_components/my-social-list/MySocialListItemLiked.tsx @@ -1,5 +1,3 @@ -'use client'; - import { useRouter } from 'next/navigation'; import ListCard from '@/components/common/Card/ListCard'; import { MySocialListCardItemLikedProps } from '@/app/mypage/_components/my-social-list/type'; diff --git a/src/app/mypage/page.tsx b/src/app/mypage/page.tsx index 86c27f69..5657e90a 100644 --- a/src/app/mypage/page.tsx +++ b/src/app/mypage/page.tsx @@ -1,15 +1,7 @@ -'use client'; - -import { redirect } from 'next/navigation'; -import { useAuth } from '@/providers/auth-provider/AuthProvider.client'; -import { APP_ROUTES } from '@/constants/appRoutes'; import MyProfile from './_components/my-profile/MyProfile'; import MySocialList from './_components/my-social-list/MySocialList'; const MyPage = () => { - const { isSignIn } = useAuth(); - if (!isSignIn) return redirect(APP_ROUTES.signin); - return (

마이 페이지

From f05a0b5e16d4cff03fd617709c5ea643d50e4de7 Mon Sep 17 00:00:00 2001 From: hoxey2react Date: Wed, 2 Jul 2025 21:08:54 +0900 Subject: [PATCH 2/9] =?UTF-8?q?refactor:=20end=5Fdate=5Ftitle=20=EC=86=8D?= =?UTF-8?q?=EC=84=B1=20=EC=B6=94=EA=B0=80,=20no=5Fimage=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/Card/ListCard.tsx | 13 +++++++++++-- src/components/common/Card/type.ts | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/common/Card/ListCard.tsx b/src/components/common/Card/ListCard.tsx index b44514e8..a73097ad 100644 --- a/src/components/common/Card/ListCard.tsx +++ b/src/components/common/Card/ListCard.tsx @@ -15,6 +15,7 @@ const ListCard = ({ chip, textContent, endDate, + endDateTitle, isCardDataLoading, isCompletedStory, isCanceled, @@ -44,7 +45,7 @@ const ListCard = ({ {!isImageLoaded || isImageLoadError || isCardDataLoading ? (
) : null} - {image.src && image.alt && !isCardDataLoading && ( + {image.src && image.alt && !isCardDataLoading ? ( {image.alt + ) : ( +
+ No Image +
)}
@@ -87,7 +92,11 @@ const ListCard = ({
{!isCardDataLoading ? ( <> - {endDate &&

종료 : {format(endDate, 'yyyy-MM-dd')}

} + {endDate && ( +

+ {endDateTitle} : {format(endDate, 'yyyy-MM-dd')} +

+ )}