From 83c26bb94a5bac96d265124b224d28fdc9ec5f30 Mon Sep 17 00:00:00 2001 From: LandaMm Date: Thu, 29 May 2025 17:03:44 +0200 Subject: [PATCH] feat: explicitly install idb + use `react-router` instead of `react-router-dom` --- web/package-lock.json | 15 +++++++++++---- web/package.json | 3 ++- web/src/App.tsx | 2 +- web/src/feature/AccountList/index.tsx | 2 +- web/src/layout/AuthLayout.tsx | 2 +- web/src/pages/Login/index.tsx | 2 +- web/src/pages/Register/index.tsx | 2 +- 7 files changed, 18 insertions(+), 10 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index 9eebc05..2ba5423 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -11,6 +11,7 @@ "@emotion/react": "^11.14.0", "@tailwindcss/vite": "^4.1.7", "axios": "^1.9.0", + "idb": "^8.0.3", "lucide-react": "^0.511.0", "next-themes": "^0.4.6", "react": "^19.1.0", @@ -18,7 +19,7 @@ "react-hook-form": "^7.56.4", "react-icons": "^5.5.0", "react-jwt": "^1.3.0", - "react-router": "^7.6.0", + "react-router": "^7.6.1", "tailwindcss": "^4.1.7", "zustand": "^5.0.5" }, @@ -3405,6 +3406,12 @@ "react-is": "^16.7.0" } }, + "node_modules/idb": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/idb/-/idb-8.0.3.tgz", + "integrity": "sha512-LtwtVyVYO5BqRvcsKuB2iUMnHwPVByPCXFXOpuU96IZPPoPN6xjOGxZQ74pgSVVLQWtUOYgyeL4GE98BY5D3wg==", + "license": "ISC" + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -4380,9 +4387,9 @@ } }, "node_modules/react-router": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.6.0.tgz", - "integrity": "sha512-GGufuHIVCJDbnIAXP3P9Sxzq3UUsddG3rrI3ut1q6m0FI6vxVBF3JoPQ38+W/blslLH4a5Yutp8drkEpXoddGQ==", + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.6.1.tgz", + "integrity": "sha512-hPJXXxHJZEsPFNVbtATH7+MMX43UDeOauz+EAU4cgqTn7ojdI9qQORqS8Z0qmDlL1TclO/6jLRYUEtbWidtdHQ==", "license": "MIT", "dependencies": { "cookie": "^1.0.1", diff --git a/web/package.json b/web/package.json index cadd41d..b8a41cd 100644 --- a/web/package.json +++ b/web/package.json @@ -13,6 +13,7 @@ "@emotion/react": "^11.14.0", "@tailwindcss/vite": "^4.1.7", "axios": "^1.9.0", + "idb": "^8.0.3", "lucide-react": "^0.511.0", "next-themes": "^0.4.6", "react": "^19.1.0", @@ -20,7 +21,7 @@ "react-hook-form": "^7.56.4", "react-icons": "^5.5.0", "react-jwt": "^1.3.0", - "react-router": "^7.6.0", + "react-router": "^7.6.1", "tailwindcss": "^4.1.7", "zustand": "^5.0.5" }, diff --git a/web/src/App.tsx b/web/src/App.tsx index da04bd8..b896697 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -1,5 +1,5 @@ import { type FC } from "react"; -import { createBrowserRouter, RouterProvider } from "react-router-dom"; +import { createBrowserRouter, RouterProvider } from "react-router"; import IndexPage from "./pages/Index"; import LoginPage from "./pages/Login"; diff --git a/web/src/feature/AccountList/index.tsx b/web/src/feature/AccountList/index.tsx index 392e011..e305d46 100644 --- a/web/src/feature/AccountList/index.tsx +++ b/web/src/feature/AccountList/index.tsx @@ -2,7 +2,7 @@ import { type LocalAccount } from "@/repository/account"; import { useAuth } from "@/store/auth"; import { CirclePlus, User } from "lucide-react"; import { useCallback, type FC } from "react"; -import { Link, useLocation } from "react-router-dom"; +import { Link, useLocation } from "react-router"; const AccountList: FC = () => { const accounts = useAuth((state) => state.accounts); diff --git a/web/src/layout/AuthLayout.tsx b/web/src/layout/AuthLayout.tsx index 1d22201..19404ba 100644 --- a/web/src/layout/AuthLayout.tsx +++ b/web/src/layout/AuthLayout.tsx @@ -7,7 +7,7 @@ import { useLocation, useNavigate, useSearchParams, -} from "react-router-dom"; +} from "react-router"; import BackgroundLayout from "./BackgroundLayout"; import { useOAuthContext } from "@/context/oauth"; diff --git a/web/src/pages/Login/index.tsx b/web/src/pages/Login/index.tsx index 29d2ddf..9fb3e6b 100644 --- a/web/src/pages/Login/index.tsx +++ b/web/src/pages/Login/index.tsx @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { Card, CardContent } from "@/components/ui/card"; import { Mail, Lock } from "lucide-react"; -import { Link, useLocation } from "react-router-dom"; +import { Link, useLocation } from "react-router"; import { Input } from "@/components/ui/input"; import { Button } from "@/components/ui/button"; diff --git a/web/src/pages/Register/index.tsx b/web/src/pages/Register/index.tsx index f0da37b..0cfce62 100644 --- a/web/src/pages/Register/index.tsx +++ b/web/src/pages/Register/index.tsx @@ -1,6 +1,6 @@ import { Card, CardContent } from "@/components/ui/card"; import { Mail, Lock, User, Phone } from "lucide-react"; -import { Link, useLocation } from "react-router-dom"; +import { Link, useLocation } from "react-router"; import { Input } from "@/components/ui/input"; import { Button } from "@/components/ui/button";