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); } }; 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;