Skip to content

Commit

Permalink
Fix: 그우린차 이미지 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
cdm1263 committed Jan 12, 2024
1 parent 061ec05 commit a712fca
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/components/card/PokemonCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ const PokemonCard = ({
? `${styles.pokemon_image__my}`
: `${styles.pokemon_image}`
}
src={data.sprites}
src={
data.id !== 1013 ? data.sprites : '/pokemonImg/그우린차.webp'
}
alt="포켓몬 이미지"
/>
<div className={styles.pokemon_intro}>
Expand Down
6 changes: 4 additions & 2 deletions src/components/cardEdit/CardsRowLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ const CardsRowLayout = ({ pokemonArray }: CardsRowLayoutProps) => {
{pokemonData ? (
<img
src={
pokemonData?.sprites?.other?.['official-artwork']
?.front_default
pokemonData.id !== 1013
? pokemonData.sprites?.other?.['official-artwork']
?.front_default
: '/pokemonImg/그우린차.webp'
}
alt="포켓몬 이미지"
/>
Expand Down
6 changes: 5 additions & 1 deletion src/components/list/PokemonListElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ const PokemonListElement = ({ data }: PokemonListElementProp) => {
<img
loading="lazy"
className={styles.pokemon_image}
src={data.sprites?.other?.['official-artwork']?.front_default}
src={
data.id !== 1013
? data.sprites?.other?.['official-artwork']?.front_default
: '/pokemonImg/그우린차.webp'
}
alt="포켓몬 이미지"
/>
<span className={styles.pokemon_name}>
Expand Down

0 comments on commit a712fca

Please sign in to comment.