From d8933535bb8a7bb3cafdb2de30f2126e8c20ad6c Mon Sep 17 00:00:00 2001 From: gwansikk Date: Sat, 21 Sep 2024 00:52:20 +0900 Subject: [PATCH] =?UTF-8?q?refactor(member):=20Main=20Hook=20=ED=94=84?= =?UTF-8?q?=EB=A1=9C=EC=A0=9D=ED=8A=B8=20=EA=B5=AC=EC=A1=B0=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20(#238)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/member/src/hooks/queries/index.ts | 1 - .../src/pages/MainPage/components/BirthdaySection.tsx | 9 +++++---- .../queries => pages/MainPage/hooks}/useBirthday.ts | 0 3 files changed, 5 insertions(+), 5 deletions(-) rename apps/member/src/{hooks/queries => pages/MainPage/hooks}/useBirthday.ts (100%) diff --git a/apps/member/src/hooks/queries/index.ts b/apps/member/src/hooks/queries/index.ts index 1eebb001..7bc15c1c 100644 --- a/apps/member/src/hooks/queries/index.ts +++ b/apps/member/src/hooks/queries/index.ts @@ -7,7 +7,6 @@ export * from './my'; export * from './schedule'; export * from './queryClient'; export * from './useAccusesMutation'; -export * from './useBirthday'; export * from './blog/useBlog'; export * from './blog/useBlogDetail'; export * from './useHire'; diff --git a/apps/member/src/pages/MainPage/components/BirthdaySection.tsx b/apps/member/src/pages/MainPage/components/BirthdaySection.tsx index 8adbabae..386efa71 100644 --- a/apps/member/src/pages/MainPage/components/BirthdaySection.tsx +++ b/apps/member/src/pages/MainPage/components/BirthdaySection.tsx @@ -1,11 +1,12 @@ import Image from '@components/common/Image/Image'; import Section from '@components/common/Section/Section'; -import { useBirthday } from '@hooks/queries'; import { createImageUrl } from '@utils/api'; import { formatMemberName } from '@utils/string'; import dayjs from 'dayjs'; +import { useBirthday } from '../hooks/useBirthday'; + export function BirthdaySection() { const { data } = useBirthday(); @@ -19,7 +20,7 @@ export function BirthdaySection() {

) : ( data.items.map(({ id, ...props }) => ( - + )) )} @@ -27,14 +28,14 @@ export function BirthdaySection() { ); } -interface CardProps { +interface BirthdayCardProps { id: string; name: string; imageUrl: string | null; birth: string; } -const Card = ({ id, name, imageUrl, birth }: CardProps) => { +const BirthdayCard = ({ id, name, imageUrl, birth }: BirthdayCardProps) => { return (