diff --git a/src/pageLayout/MypageLayout/MyContent.tsx b/src/pageLayout/MypageLayout/MyContent.tsx index d97e9933..81c91dda 100644 --- a/src/pageLayout/MypageLayout/MyContent.tsx +++ b/src/pageLayout/MypageLayout/MyContent.tsx @@ -2,32 +2,14 @@ import { useEffect, useState } from 'react'; import useGetEpigrams from '@/hooks/useGetEpigrams'; import MyEpigrams from '@/user/ui-content/MyEpigrams'; import Image from 'next/image'; -import { Button } from '@/components/ui/button'; import { useToast } from '@/components/ui/use-toast'; -import NONE_EPI from '../../../public/none-epi.svg'; +import { EpigramsResponse } from '@/types/epigram.types'; import spinner from '../../../public/spinner.svg'; interface MyContentProps { userId: number; } -interface Epigram { - writerId: number; - id: number; - likeCount: number; - tags: { id: number; name: string }[]; - referenceUrl: string; - referenceTitle: string; - author: string; - content: string; -} - -interface EpigramsResponse { - totalCount: number; - nextCursor: number | null; - list: Epigram[]; -} - export default function MyContent({ userId }: MyContentProps) { const limit = 3; const [cursor, setCursor] = useState(0); @@ -53,7 +35,7 @@ export default function MyContent({ userId }: MyContentProps) { } }, [data]); - const handleMoreLoad = () => { + const handleMoreEpigramLoad = () => { if (epigrams.nextCursor !== null) { setCursor(epigrams.nextCursor); setIsLoadingMore(true); @@ -75,7 +57,7 @@ export default function MyContent({ userId }: MyContentProps) {
아직 작성한 에피그램이 없어요!
-에피그램을 작성하고 감정을 공유해보세요.
-아직 작성한 에피그램이 없어요!
+에피그램을 작성하고 감정을 공유해보세요.
+