File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 11import React from "react" ;
2- import Image , { ImageProps , StaticImageData } from "next/image" ;
2+ import { ImageProps } from "next/image" ;
33import styled , { css } from "styled-components" ;
4- import { StaticImport } from "next/dist/shared/lib/get-img-props" ;
54
65interface FallbackImgImageProps extends ImageProps {
7- fallbackSrc : StaticImageData | string ;
6+ fallbackSrc : string ;
87 alt : string ;
98 sizes ?: string ;
109 rounded ?: boolean ;
1110 isShouldHide ?: boolean ;
11+ src : string ;
1212}
1313
1414const FallbackImgImage = ( {
@@ -20,12 +20,10 @@ const FallbackImgImage = ({
2020 rounded,
2121 ...props
2222} : FallbackImgImageProps ) => {
23- const [ imgSrc , setImgSrc ] = React . useState <
24- StaticImageData | StaticImport | string
25- > ( "" ) ;
23+ const [ imgSrc , setImgSrc ] = React . useState < string > ( "" ) ;
2624
2725 React . useEffect ( ( ) => {
28- setImgSrc ( src ?? "/" ) ;
26+ setImgSrc ( src ) ;
2927 } , [ src ] ) ;
3028
3129 return (
You can’t perform that action at this time.
0 commit comments