add jpg module

This commit is contained in:
Alejandro Gomez 2023-01-16 23:04:10 +01:00
parent 57e6580795
commit ea0e925021
No known key found for this signature in database
GPG Key ID: 4DF39E566658C817
4 changed files with 5 additions and 4 deletions

4
d.ts Normal file
View File

@ -0,0 +1,4 @@
declare module "*.jpg" {
const value: any
export default value
}

View File

@ -1,5 +1,4 @@
import "./Avatar.css"; import "./Avatar.css";
// @ts-expect-error
import Nostrich from "../nostrich.jpg"; import Nostrich from "../nostrich.jpg";
import { CSSProperties } from "react"; import { CSSProperties } from "react";

View File

@ -1,5 +1,4 @@
import "./Textarea.css"; import "./Textarea.css";
// @ts-expect-error
import Nostrich from "../nostrich.jpg"; import Nostrich from "../nostrich.jpg";
import { useLiveQuery } from "dexie-react-hooks"; import { useLiveQuery } from "dexie-react-hooks";

View File

@ -1,5 +1,4 @@
import "./SettingsPage.css"; import "./SettingsPage.css";
// @ts-ignore
import Nostrich from "../nostrich.jpg"; import Nostrich from "../nostrich.jpg";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
@ -196,7 +195,7 @@ export default function SettingsPage() {
</div> </div>
<div> <div>
<h2>Header</h2> <h2>Header</h2>
<div style={{ backgroundImage: `url(${(banner?.length ?? 0) === 0 ? avatarPicture : banner})` }} className="banner"> <div style={{ backgroundImage: `url(${(banner?.length ?? 0) === 0 ? Nostrich : banner})` }} className="banner">
<div className="edit" onClick={() => setNewBanner()}>Edit</div> <div className="edit" onClick={() => setNewBanner()}>Edit</div>
</div> </div>
</div> </div>