Skip to content

Commit f8a831c

Browse files
Fixed errors in validity of types check.
Signed-off-by: Michael Valdron <[email protected]>
1 parent 031dc4e commit f8a831c

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

.eslintrc.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@
8282
// It's not accurate in the monorepo style
8383
"import/no-extraneous-dependencies": "off",
8484
// Import for import of components
85-
"import/no-cycle": "off"
85+
"import/no-cycle": "off",
86+
// Disables the no img tag rule
87+
"@next/next/no-img-element": "off"
8688
},
8789
"overrides": [
8890
{
+4-10
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
1-
import * as React from 'react';
1+
import React from 'react';
22

33
export interface GifPlayerProps
44
extends React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> {
5-
src?: string;
5+
src: string;
66

77
className?: string;
88

99
alt?: string;
1010
}
1111

1212
export const GifPlayer: React.FC<GifPlayerProps> = ({
13+
src,
1314
className = '',
14-
src = '',
1515
alt = 'loading...',
1616
...props
17-
}: GifPlayerProps) => {
18-
return (
19-
<>
20-
<img {...props} className={className} src={src} alt={alt} />
21-
</>
22-
);
23-
};
17+
}: GifPlayerProps) => <img {...props} className={className} src={src} alt={alt} />;

src/components/WhyDevfiles/WhyDevfiles.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ export const WhyDevfiles: React.FC<WhyDevfilesProps> = (props: WhyDevfilesProps)
1919
<Text className={styles.bodyText}>{whyDevfiles.body}</Text>
2020
</TextContent>
2121
<br />
22-
<GifPlayer
23-
style={{ width: '700px', display: 'block', marginLeft: 'auto', marginRight: 'auto' }}
24-
src="images/demo.gif"
25-
/>
22+
<GifPlayer width="1920px" height="1080px" src="/images/demo.gif" />
2623
</div>
2724
);
2825
};

0 commit comments

Comments
 (0)