Skip to content

Commit

Permalink
Merge pull request side-project-pokehub#132 from side-project-pokehub…
Browse files Browse the repository at this point in the history
…/dev

옵티미스틱 업데이트 수정
  • Loading branch information
DICEPT committed Jul 19, 2024
1 parent 638d051 commit b590be9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/components/detail/LikePokemon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand All @@ -61,7 +64,6 @@ const LikePokemon = ({ pokemonId, isLoading }: LikePokemonProps) => {
});
} catch (error) {
console.log(error);
} finally {
setIsLiked((prev) => !prev);
}
};
Expand Down
4 changes: 2 additions & 2 deletions src/components/dex/PokemonDex.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
}

.pokemon_list_element {
width: 100%;
height: 315px;
/* width: 100%;
height: 315px; */
display: flex;
position: relative;
align-items: center;
Expand Down

0 comments on commit b590be9

Please sign in to comment.