fix img warnings
This commit is contained in:
1 parent
7ea10f3f25
commit
845cd2b327
2 files changed
+7
-2
No files matched your search
@@ -3,6 +3,7 @@ import s from "./styles.module.css"
|
|||||||
import { FileDefinition } from "src/types"
|
import { FileDefinition } from "src/types"
|
||||||
import { ext, size } from "src/lib/file"
|
import { ext, size } from "src/lib/file"
|
||||||
import Link from "next/link"
|
import Link from "next/link"
|
||||||
|
import Image from "next/image"
|
||||||
|
|
||||||
export type FileProps = FileDefinition & {
|
export type FileProps = FileDefinition & {
|
||||||
style?: React.CSSProperties
|
style?: React.CSSProperties
|
||||||
@@ -13,7 +14,10 @@ export const File: React.FC<FileProps> = props => (
|
|||||||
{!props.cover?.src ? null : (
|
{!props.cover?.src ? null : (
|
||||||
<div className={s.image}>
|
<div className={s.image}>
|
||||||
<Link href={props.file.src} target="_blank" rel="noreferrer" className="invisible">
|
<Link href={props.file.src} target="_blank" rel="noreferrer" className="invisible">
|
||||||
<img src={props.cover.src} alt={props.name} />
|
<Image
|
||||||
|
src={props.cover.src}
|
||||||
|
alt={props.name}
|
||||||
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import s from "./error.module.css"
|
import s from "./error.module.css"
|
||||||
|
|
||||||
import Link from "next/link"
|
import Link from "next/link"
|
||||||
|
import Image from "next/image"
|
||||||
|
|
||||||
export const NotFound: React.FC = () => (
|
export const NotFound: React.FC = () => (
|
||||||
<section className={s.section}>
|
<section className={s.section}>
|
||||||
<div>
|
<div>
|
||||||
<h1>Страница не найдена</h1>
|
<h1>Страница не найдена</h1>
|
||||||
<img src="/static/graphics/skull.jpg" />
|
<Image src="/static/graphics/skull.jpg" alt="Not found" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in new issue
Block a user