From 12ef74275c176162aff22c28022f3a73cae95527 Mon Sep 17 00:00:00 2001 From: Jeremy <102432453+shackstack@users.noreply.github.com> Date: Fri, 29 Dec 2023 16:51:03 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EB=A1=9C?= =?UTF-8?q?=EB=93=9C=EB=8F=99=EC=95=88=20=EC=8A=A4=EC=BC=88=EB=A0=88?= =?UTF-8?q?=ED=86=A4=20=EC=9C=A0=EC=A7=80=EC=8B=9C=ED=82=A4=EA=B8=B0=20(#6?= =?UTF-8?q?66)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../@common/WaterMarkImage/WaterMarkImage.tsx | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/@common/WaterMarkImage/WaterMarkImage.tsx b/frontend/src/components/@common/WaterMarkImage/WaterMarkImage.tsx index 4f53bcd3d..817014518 100644 --- a/frontend/src/components/@common/WaterMarkImage/WaterMarkImage.tsx +++ b/frontend/src/components/@common/WaterMarkImage/WaterMarkImage.tsx @@ -1,3 +1,4 @@ +import { useState } from 'react'; import { styled, css } from 'styled-components'; import { BORDER_RADIUS, FONT_SIZE, paintSkeleton } from '~/styles/common'; import { getImgUrl } from '~/utils/image'; @@ -10,6 +11,8 @@ interface WaterMarkImageProps { } function WaterMarkImage({ waterMark, imageUrl, type, sns }: WaterMarkImageProps) { + const [isImageLoading, setIsImageLoading] = useState(true); + const onClickWaterMark = (e: React.MouseEvent) => { e.stopPropagation(); @@ -18,11 +21,16 @@ function WaterMarkImage({ waterMark, imageUrl, type, sns }: WaterMarkImageProps) }; return ( - + - + setIsImageLoading(false)} + /> {waterMark && (