diff --git a/src/app/main/DigestTab/index.tsx b/src/app/main/DigestTab/index.tsx index 44c6c14..162b1b2 100644 --- a/src/app/main/DigestTab/index.tsx +++ b/src/app/main/DigestTab/index.tsx @@ -6,6 +6,7 @@ import { useEffect, useState } from 'react'; import ArticleCard from '@/components/Article/ArticleCard'; import RecommendArea from '../TodayTab/RecommendArea'; import { useUnreadQuery } from '@/api/hooks/useFetchMailQuery'; +import EmptyMailView from '@/components/EmptyMailView'; const DigestTab = () => { const [selectedTab, setSelectedTab] = useState<'all' | 'unread'>('unread'); @@ -14,9 +15,16 @@ const DigestTab = () => { return isFetched ? (
-
+
- {data?.map(article => )} + + {data?.length === 0 ? ( +
+ +
+ ) : ( + data?.map(article => ) + )}
diff --git a/src/components/EmptyMailView.tsx b/src/components/EmptyMailView.tsx new file mode 100644 index 0000000..b82ee1c --- /dev/null +++ b/src/components/EmptyMailView.tsx @@ -0,0 +1,30 @@ +import Image from 'next/image'; +import Link from 'next/link'; +import EmptyView from '@/assets/images/EmptyView.png'; + +const EmptyMailView = () => { + return ( +
+
+ EmptyView +
+ 뉴스레터를 모두 읽었어요 + + 더 많은 뉴스레터를 읽고 싶다면 + + 탐색 탭으로 이동 + + +
+
+
+ ); +}; + +export default EmptyMailView;