⬆ Bump frontend deps
♻ Replace vite svg plugin react-router v6 fixes
This commit is contained in:
1 parent
87e2f2292c
commit
ed99dadcb0
9 files changed
+5109
-5325
No files matched your search
Generated
+5066
-5282
File diff suppressed because it is too large.
Load diff
+24
-24
@@ -15,46 +15,46 @@
|
|||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apollo/client": "^3.4.16",
|
"@apollo/client": "^3.5.8",
|
||||||
"bootstrap": "^5.1.3",
|
"bootstrap": "^5.1.3",
|
||||||
"bootstrap-icons": "^1.7.0",
|
"bootstrap-icons": "^1.8.0",
|
||||||
"clsx": "^1.1.1",
|
"clsx": "^1.1.1",
|
||||||
"date-fns": "^2.25.0",
|
"date-fns": "^2.28.0",
|
||||||
"graphql": "^15.7.2",
|
"graphql": "^16.3.0",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"react-router-dom": "^5.3.0"
|
"react-router-dom": "^6.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@graphql-codegen/cli": "^2.2.2",
|
"@graphql-codegen/cli": "^2.5.0",
|
||||||
"@graphql-codegen/typed-document-node": "^2.2.0",
|
"@graphql-codegen/typed-document-node": "^2.2.3",
|
||||||
"@graphql-codegen/typescript-operations": "^2.2.0",
|
"@graphql-codegen/typescript-operations": "^2.2.4",
|
||||||
"@graphql-typed-document-node/core": "^3.1.0",
|
"@graphql-typed-document-node/core": "^3.1.1",
|
||||||
"@types/bootstrap": "^5.1.6",
|
"@types/bootstrap": "^5.1.9",
|
||||||
"@types/react": "^17.0.34",
|
"@types/react": "^17.0.39",
|
||||||
"@types/react-dom": "^17.0.11",
|
"@types/react-dom": "^17.0.11",
|
||||||
"@types/react-router-dom": "^5.3.2",
|
"@types/react-router-dom": "^5.3.3",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.3.1",
|
"@typescript-eslint/eslint-plugin": "^5.10.2",
|
||||||
"@typescript-eslint/parser": "^5.3.1",
|
"@typescript-eslint/parser": "^5.10.2",
|
||||||
"@vitejs/plugin-react": "^1.0.8",
|
"@vitejs/plugin-react": "^1.1.4",
|
||||||
"@vitejs/plugin-react-refresh": "^1.3.6",
|
"@vitejs/plugin-react-refresh": "^1.3.6",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^8.8.0",
|
||||||
"eslint-config-prettier": "^8.3.0",
|
"eslint-config-prettier": "^8.3.0",
|
||||||
"eslint-plugin-import": "^2.25.3",
|
"eslint-plugin-import": "^2.25.4",
|
||||||
"eslint-plugin-prettier": "^4.0.0",
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
"eslint-plugin-react": "^7.27.0",
|
"eslint-plugin-react": "^7.28.0",
|
||||||
"eslint-plugin-react-hooks": "^4.3.0",
|
"eslint-plugin-react-hooks": "^4.3.0",
|
||||||
"jest": "^27.3.1",
|
"jest": "^27.5.0",
|
||||||
"prettier": "^2.4.1",
|
"prettier": "^2.5.1",
|
||||||
"stylelint": "^14.0.1",
|
"stylelint": "^14.3.0",
|
||||||
"stylelint-config-idiomatic-order": "^8.1.0",
|
"stylelint-config-idiomatic-order": "^8.1.0",
|
||||||
"stylelint-config-prettier": "^9.0.3",
|
"stylelint-config-prettier": "^9.0.3",
|
||||||
"stylelint-config-recommended": "^6.0.0",
|
"stylelint-config-recommended": "^6.0.0",
|
||||||
"stylelint-order": "^5.0.0",
|
"stylelint-order": "^5.0.0",
|
||||||
"stylelint-prettier": "^2.0.0",
|
"stylelint-prettier": "^2.0.0",
|
||||||
"typescript": "^4.4.4",
|
"typescript": "^4.5.5",
|
||||||
"vite": "^2.6.14",
|
"vite": "^2.7.13",
|
||||||
"vite-plugin-react-svg": "^0.2.0"
|
"vite-plugin-svgr": "^1.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16",
|
"node": ">=16",
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { Route, Switch } from "react-router-dom";
|
import { Route, Routes as ReactRouterRoutes } from "react-router-dom";
|
||||||
|
|
||||||
import { Deposit } from "./features/deposit/Deposit";
|
import { Deposit } from "./features/deposit/Deposit";
|
||||||
import { Log } from "./features/log/Log";
|
import { Log } from "./features/log/Log";
|
||||||
import { Register } from "./features/register/Register";
|
import { Register } from "./features/register/Register";
|
||||||
|
|
||||||
export const Routes: React.FC = () => (
|
export const Routes: React.FC = () => (
|
||||||
<Switch>
|
<ReactRouterRoutes>
|
||||||
<Route path="/deposit" component={Deposit} />
|
<Route path="/deposit" element={<Deposit />} />
|
||||||
<Route path="/log" component={Log} />
|
<Route path="/log" element={<Log />} />
|
||||||
<Route path="/" exact component={Register} />
|
<Route path="/" element={<Register />} />
|
||||||
</Switch>
|
</ReactRouterRoutes>
|
||||||
);
|
);
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
import BarChart from "bootstrap-icons/icons/bar-chart.svg";
|
import { ReactComponent as BarChart } from "bootstrap-icons/icons/bar-chart.svg";
|
||||||
import CardList from "bootstrap-icons/icons/card-list.svg";
|
import { ReactComponent as CardList } from "bootstrap-icons/icons/card-list.svg";
|
||||||
import House from "bootstrap-icons/icons/house.svg";
|
import { ReactComponent as House } from "bootstrap-icons/icons/house.svg";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { NavLink } from "react-router-dom";
|
import { NavLink } from "react-router-dom";
|
||||||
|
|
||||||
import Logo from "../assets/brick.svg";
|
import { ReactComponent as Logo } from "../assets/brick.svg";
|
||||||
import styles from "./Header.module.css";
|
import styles from "./Header.module.css";
|
||||||
|
|
||||||
export const Header: React.FC = () => {
|
export const Header: React.FC = () => {
|
||||||
@@ -31,7 +31,7 @@ export const Header: React.FC = () => {
|
|||||||
<div className="collapse navbar-collapse" id="navbarNav">
|
<div className="collapse navbar-collapse" id="navbarNav">
|
||||||
<ul className="navbar-nav">
|
<ul className="navbar-nav">
|
||||||
<li className="nav-item">
|
<li className="nav-item">
|
||||||
<NavLink to="/" className="nav-link" activeClassName="active" exact>
|
<NavLink to="/" className={({ isActive }) => (isActive ? "nav-link active" : "nav-link")} end>
|
||||||
<span className={styles.navIcon}>
|
<span className={styles.navIcon}>
|
||||||
<House />
|
<House />
|
||||||
</span>{" "}
|
</span>{" "}
|
||||||
@@ -39,7 +39,7 @@ export const Header: React.FC = () => {
|
|||||||
</NavLink>
|
</NavLink>
|
||||||
</li>
|
</li>
|
||||||
<li className="nav-item">
|
<li className="nav-item">
|
||||||
<NavLink to="/deposit" className="nav-link" activeClassName="active">
|
<NavLink to="/deposit" className={({ isActive }) => (isActive ? "nav-link active" : "nav-link")}>
|
||||||
Sett inn penger
|
Sett inn penger
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import PersonFill from "bootstrap-icons/icons/person-fill.svg";
|
import { ReactComponent as PersonFill } from "bootstrap-icons/icons/person-fill.svg";
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
import React, { MouseEventHandler } from "react";
|
import React, { MouseEventHandler } from "react";
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-2
@@ -1,8 +1,7 @@
|
|||||||
/* svgs */
|
/* svgs */
|
||||||
declare module "*.svg" {
|
declare module "*.svg" {
|
||||||
import { ReactElement, SVGProps } from "react";
|
import { ReactElement, SVGProps } from "react";
|
||||||
const content: (props: SVGProps<SVGElement>) => ReactElement;
|
export const ReactComponent: (props: SVGProps<SVGElement>) => ReactElement;
|
||||||
export default content;
|
|
||||||
}
|
}
|
||||||
/* CSS modules */
|
/* CSS modules */
|
||||||
declare module "*.module.css";
|
declare module "*.module.css";
|
||||||
|
|||||||
@@ -14,7 +14,8 @@
|
|||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"jsx": "react-jsx"
|
"jsx": "react-jsx",
|
||||||
|
"types": [ "@honkhonk/vite-plugin-svgr/client" ]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"./src",
|
"./src",
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/* eslint-disable import/no-extraneous-dependencies */
|
/* eslint-disable import/no-extraneous-dependencies */
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
import reactSvgPlugin from "vite-plugin-react-svg";
|
import svgr from "vite-plugin-svgr";
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
base: process.env.NODE_ENV !== "production" ? "/" : "/static/modern/",
|
base: process.env.NODE_ENV !== "production" ? "/" : "/static/modern/",
|
||||||
plugins: [reactSvgPlugin({ defaultExport: "component" })],
|
plugins: [svgr()],
|
||||||
define: {
|
define: {
|
||||||
__DEV__: process.env.NODE_ENV !== "production",
|
__DEV__: process.env.NODE_ENV !== "production",
|
||||||
},
|
},
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ import strawberry
|
|||||||
import strawberry_django
|
import strawberry_django
|
||||||
|
|
||||||
from main.api import mutations
|
from main.api import mutations
|
||||||
from main.api.types import Order, Product, User, Transaction
|
from main.api.types import Order, Product, Transaction, User
|
||||||
|
|
||||||
|
|
||||||
@strawberry.type
|
@strawberry.type
|
||||||
|
|||||||
Reference in new issue
Block a user