fix img warnings

This commit is contained in:
tmshv committed 2024-11-29 22:52:31 +03:00
1 parent 7ea10f3f25
commit 845cd2b327
2 files changed
+7 -2

No files matched your search

+5 -1
View File
@@ -3,6 +3,7 @@ import s from "./styles.module.css"
import { FileDefinition } from "src/types"
import { ext, size } from "src/lib/file"
import Link from "next/link"
import Image from "next/image"
export type FileProps = FileDefinition & {
style?: React.CSSProperties
@@ -13,7 +14,10 @@ export const File: React.FC<FileProps> = props => (
{!props.cover?.src ? null : (
<div className={s.image}>
<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>
</div>
)}
+2 -1
View File
@@ -1,12 +1,13 @@
import s from "./error.module.css"
import Link from "next/link"
import Image from "next/image"
export const NotFound: React.FC = () => (
<section className={s.section}>
<div>
<h1>Страница не найдена</h1>
<img src="/static/graphics/skull.jpg" />
<Image src="/static/graphics/skull.jpg" alt="Not found" />
</div>
<div>