diff --git a/custom.d.ts b/custom.d.ts index ef95ff2..09409b9 100644 --- a/custom.d.ts +++ b/custom.d.ts @@ -3,4 +3,10 @@ declare module "*.module.css" { export default classes; } -declare module "*.svg"; +declare module "*.svg" { + const ref: React.RefForwardingComponent< + SVGSVGElement, + React.SVGAttributes + >; + export default ref; +} diff --git a/package.json b/package.json index 095d3e7..e0bfee8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "scripts": { - "dev": "SNOWPACK_PUBLIC_API_URL=http://localhost:5000 SNOWPACK_PUBLIC_BASE_URL=http://localhost:8080 snowpack dev", + "dev": "SNOWPACK_PUBLIC_API_URL=http://localhost:8081 SNOWPACK_PUBLIC_BASE_URL=http://localhost:8080 snowpack dev", "build": "snowpack build", "test": "echo \"Error: no test specified\" && exit 1" }, @@ -11,12 +11,12 @@ "@types/react-dom": "^17.0.3", "@types/snowpack-env": "^2.3.3", "snowpack": "^3.3.5", + "snowpack-plugin-svgr": "^0.1.2", "typescript": "^4.2.4" }, "dependencies": { "react": "^17.0.2", "react-dom": "^17.0.2", - "serve": "^12.0.0", "wouter": "^2.7.4" } } diff --git a/public/logo.svg b/public/logo.svg index 2283463..614acb0 100644 --- a/public/logo.svg +++ b/public/logo.svg @@ -2,8 +2,6 @@ - - { @@ -15,12 +15,7 @@ export const Navbar = () => { {path === "/" ? ( - Publite logotype + ) : ( Publite diff --git a/src/assets/logo.svg b/src/assets/logo.svg index f739aa6..614acb0 100644 --- a/src/assets/logo.svg +++ b/src/assets/logo.svg @@ -2,8 +2,6 @@ { @@ -14,7 +14,7 @@ export const AddBook = () => { }} className={styles.container} > - +

Add book

); diff --git a/src/pages/UploadForm/index.tsx b/src/pages/UploadForm/index.tsx index 081a633..820af34 100644 --- a/src/pages/UploadForm/index.tsx +++ b/src/pages/UploadForm/index.tsx @@ -1,7 +1,7 @@ import React, { useContext, useEffect, useState } from "react"; import { useLocation } from "wouter"; -import plusIcon from "~/assets/plus.svg"; +import PlusIcon from "~/assets/plus.svg"; import styles from "./UploadForm.module.css"; import { submitFile, validateResponse, validState } from "~/utils/api"; import { BookListContext } from "~/context"; @@ -51,7 +51,7 @@ export const UploadForm = ({ setLoading }: IPageProps) => { onDragOver={handleDragOver} >