From 186b615acfc894bb3c768248b5275fea2335a1bf Mon Sep 17 00:00:00 2001 From: Seoyoung Date: Wed, 7 Feb 2024 20:23:29 +0900 Subject: [PATCH] =?UTF-8?q?Chore:=20=EB=B6=88=ED=95=84=EC=9A=94=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_components/item/LinkPreview.css.ts | 26 ------------- .../create/_components/item/LinkPreview.tsx | 39 ------------------- 2 files changed, 65 deletions(-) delete mode 100644 src/app/create/_components/item/LinkPreview.css.ts delete mode 100644 src/app/create/_components/item/LinkPreview.tsx diff --git a/src/app/create/_components/item/LinkPreview.css.ts b/src/app/create/_components/item/LinkPreview.css.ts deleted file mode 100644 index a7c14b02..00000000 --- a/src/app/create/_components/item/LinkPreview.css.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { style } from '@vanilla-extract/css'; - -export const previewBox = style({ - width: '90px', - height: '90px', - - display: 'flex', - flexDirection: 'column', - justifyContent: 'center', - alignItems: 'center', - - position: 'relative', - - backgroundColor: '#EBF4FF', - - borderRadius: '10px', - whiteSpace: 'pre-wrap', - overflow: 'hidden', - cursor: 'pointer', -}); - -export const clearButton = style({ - position: 'absolute', - top: '5px', - right: '5px', -}); diff --git a/src/app/create/_components/item/LinkPreview.tsx b/src/app/create/_components/item/LinkPreview.tsx deleted file mode 100644 index 85f6c161..00000000 --- a/src/app/create/_components/item/LinkPreview.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import Image from 'next/image'; - -import ClearBlackIcon from '/public/icons/clear_x_black.svg'; -import LinkIcon from '/public/icons/link.svg'; -import * as styles from './LinkPreview.css'; - -interface LinkPreviewProps { - type: 'link' | 'image'; - url?: string; - domain?: string; - imageUrl?: string; - handleClearButtonClick: () => void; -} - -export default function PreviewBox({ type, url, domain, imageUrl, handleClearButtonClick }: LinkPreviewProps) { - const handlePreviewClick = () => { - window.open(url); - }; - - const handleClearClick = (e: React.MouseEvent) => { - e.stopPropagation(); - handleClearButtonClick(); - }; - - return ( -
- {type === 'link' && ( - <> - -

{domain}

- - )} - {type === 'image' && 첨부 이미지} - -
- ); -}