Skip to content

Commit

Permalink
refactor(member): Main Hook 프로젝트 구조 변경 (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
gwansikk committed Sep 20, 2024
1 parent 65f8fa9 commit d893353
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion apps/member/src/hooks/queries/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
9 changes: 5 additions & 4 deletions apps/member/src/pages/MainPage/components/BirthdaySection.tsx
Original file line number Diff line number Diff line change
@@ -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();

Expand All @@ -19,22 +20,22 @@ export function BirthdaySection() {
</p>
) : (
data.items.map(({ id, ...props }) => (
<Card key={id} id={id} {...props} />
<BirthdayCard key={id} id={id} {...props} />
))
)}
</Section.Body>
</Section>
);
}

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 (
<div className="flex flex-col items-center gap-4 rounded-lg px-4 pt-2">
<Image
Expand Down

0 comments on commit d893353

Please sign in to comment.