🎨 fix img

This commit is contained in:
Hugo Lextrait 2023-05-12 10:51:12 +02:00
parent 3a001da691
commit ea40b10af9

View File

@ -3,7 +3,6 @@ import React from "react";
import Typography, { ITypo, ITypoColor } from "../Typography";
import classes from "./classes.module.scss";
import Loader from "../Loader";
import Image from "next/image";
type IProps = {
href: string;
@ -30,7 +29,7 @@ export default class FilePreview extends React.Component<IProps, IState> {
{type?.toLowerCase() === "pdf" && (
<embed src={this.props.href} width="100%" height="100%" type="application/pdf" className={classes["pdf"]} />
)}
{type?.toLowerCase() !== "pdf" && <Image src={this.props.href} alt="File preview" className={classes["image"]} />}
{type?.toLowerCase() !== "pdf" && <img src={this.props.href} alt="File preview" className={classes["image"]} />}
</div>
</div>
);