From b3f1d6b19dfdcf1a3cf69c78aecb21d2f3335fa8 Mon Sep 17 00:00:00 2001 From: BearHumanS Date: Fri, 19 Jul 2024 18:53:57 +0900 Subject: [PATCH 1/2] =?UTF-8?q?Refactor:=20=EC=98=B5=ED=8B=B0=EB=AF=B8?= =?UTF-8?q?=EC=8A=A4=ED=8B=B1=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20?= =?UTF-8?q?=EC=B5=9C=EC=A0=81=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/detail/LikePokemon.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/detail/LikePokemon.tsx b/src/components/detail/LikePokemon.tsx index 66c50ca..45e7f75 100644 --- a/src/components/detail/LikePokemon.tsx +++ b/src/components/detail/LikePokemon.tsx @@ -37,7 +37,10 @@ const LikePokemon = ({ pokemonId, isLoading }: LikePokemonProps) => { if (!user?.uid) { return alert('로그인이 필요합니다.'); } + + setIsLiked((prev) => !prev); setAnimate(true); + try { const docSnap = await getDocument(`/likes/${user.uid}`); let likes = []; @@ -61,7 +64,6 @@ const LikePokemon = ({ pokemonId, isLoading }: LikePokemonProps) => { }); } catch (error) { console.log(error); - } finally { setIsLiked((prev) => !prev); } }; From 9b3c46ad4966d941ba1e641626e2f210c58be38b Mon Sep 17 00:00:00 2001 From: BearHumanS Date: Fri, 19 Jul 2024 18:54:16 +0900 Subject: [PATCH 2/2] =?UTF-8?q?style:=20=ED=8F=AC=EC=BC=93=EB=AA=AC=20?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=EB=86=92=EC=9D=B4=20=EB=84=93?= =?UTF-8?q?=EC=9D=B4=20=EC=A3=BC=EC=84=9D=20=EC=B2=98=EB=A6=AC=20(?= =?UTF-8?q?=EC=9E=84=EC=8B=9C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/dex/PokemonDex.module.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/dex/PokemonDex.module.scss b/src/components/dex/PokemonDex.module.scss index 418536d..ade0468 100644 --- a/src/components/dex/PokemonDex.module.scss +++ b/src/components/dex/PokemonDex.module.scss @@ -13,8 +13,8 @@ } .pokemon_list_element { - width: 100%; - height: 315px; + /* width: 100%; + height: 315px; */ display: flex; position: relative; align-items: center;