-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #219 from choooz/JR-898-fix-fail-to-load-image
[JR-898] 전통주 이미지가 로드되지 않는 이슈 해결
- Loading branch information
Showing
10 changed files
with
66 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
apps/jurumarble/src/app/search/components/VoteDescription.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { ImageProps } from 'next/image'; | ||
import { DrinkImage } from 'public/images'; | ||
|
||
import FallbackImage from './FallbackImage'; | ||
|
||
function DrinkImageWrapper({ ...rest }: ImageProps) { | ||
return <FallbackImage fallbackSrc={DrinkImage} {...rest} />; | ||
} | ||
|
||
export default DrinkImageWrapper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { useState } from 'react'; | ||
|
||
import Image, { ImageProps, StaticImageData } from 'next/image'; | ||
|
||
interface Props extends ImageProps { | ||
fallbackSrc: string | StaticImageData; | ||
} | ||
|
||
function FallbackImage({ alt, src, fallbackSrc, ...rest }: Props) { | ||
const [error, setError] = useState(false); | ||
return ( | ||
<Image | ||
alt={alt} | ||
src={error === true ? fallbackSrc : src} | ||
onError={() => setError(true)} | ||
{...rest} | ||
/> | ||
); | ||
} | ||
|
||
export default FallbackImage; |
This file was deleted.
Oops, something went wrong.