🎨 fix img
This commit is contained in:
parent
3a001da691
commit
ea40b10af9
@ -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;
|
||||
@ -27,11 +26,11 @@ export default class FilePreview extends React.Component<IProps, IState> {
|
||||
</Typography>
|
||||
)}
|
||||
<div className={classes["file-container"]}>
|
||||
{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"]} />}
|
||||
</div>
|
||||
{type?.toLowerCase() === "pdf" && (
|
||||
<embed src={this.props.href} width="100%" height="100%" type="application/pdf" className={classes["pdf"]} />
|
||||
)}
|
||||
{type?.toLowerCase() !== "pdf" && <img src={this.props.href} alt="File preview" className={classes["image"]} />}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user