From 7f37afb87c7748cb8c724399580e173150554830 Mon Sep 17 00:00:00 2001 From: ohdong9795 Date: Sun, 26 May 2024 20:21:50 +0900 Subject: [PATCH] =?UTF-8?q?[=EC=98=A4=EB=8F=99=ED=98=81]=20Week15?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/shared/Content.tsx | 1 - components/shared/SampleItems.tsx | 61 ------------------------------- 2 files changed, 62 deletions(-) delete mode 100644 components/shared/SampleItems.tsx diff --git a/components/shared/Content.tsx b/components/shared/Content.tsx index 6a53e4a48..7cbead820 100644 --- a/components/shared/Content.tsx +++ b/components/shared/Content.tsx @@ -1,4 +1,3 @@ -import SampleItems from './SampleItems'; import Search from '@/components/common/Search'; import styled from 'styled-components'; import { FetchData, LinkData } from '@/common/api'; diff --git a/components/shared/SampleItems.tsx b/components/shared/SampleItems.tsx deleted file mode 100644 index 6ff3661ce..000000000 --- a/components/shared/SampleItems.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import styled from 'styled-components'; -import { LinkSample } from '@/common/api'; -import Item from '@/components/common/Item'; -import { SIZE } from '@/constants/size'; - -const EmptyDiv = styled.div` - width: 100%; - height: 240px; - display: flex; - justify-content: center; - align-items: center; -`; - -const EmptySpan = styled.span` - text-align: center; - font-weight: bold; - @media screen and (min-width: ${SIZE.PC.minWidth}) { - width: 1060px; - } - - @media screen and (min-width: ${SIZE.tablet.minWidth}) and (max-width: ${SIZE.tablet.maxWidth}) { - width: 700px; - } - - @media screen and (max-width: ${SIZE.mobile.maxWidth}) { - max-width: 687px; - } -`; - -interface SampleItemsProps { - linkData: { data: LinkSample | null; loading: boolean; error: Error | null }; -} - -function SampleItems({ linkData }: SampleItemsProps) { - const { data, loading, error } = linkData; - - return ( - <> - {!loading && - error === null && - (data?.folder?.links.length === 0 ? ( - - 저장된 링크가 없습니다. - - ) : ( - data?.folder?.links.map((item) => ( - - )) - ))} - - ); -} - -export default SampleItems;