diff --git a/src/frontend/index.html b/src/frontend/index.html index c99fd9f2f..7837ad39f 100644 --- a/src/frontend/index.html +++ b/src/frontend/index.html @@ -1,4 +1,4 @@ - +
diff --git a/src/frontend/package-lock.json b/src/frontend/package-lock.json index 811237487..ed2b933c3 100644 --- a/src/frontend/package-lock.json +++ b/src/frontend/package-lock.json @@ -31,6 +31,7 @@ "@tabler/icons-react": "^3.6.0", "@tailwindcss/forms": "^0.5.7", "@tailwindcss/line-clamp": "^0.4.4", + "@tanstack/react-query": "^5.49.2", "@types/axios": "^0.14.0", "ace-builds": "^1.35.0", "ag-grid-community": "^31.3.2", @@ -78,6 +79,7 @@ "tailwindcss-animate": "^1.0.7", "uuid": "^10.0.0", "vite-plugin-svgr": "^4.2.0", + "vite-tsconfig-paths": "^4.3.2", "web-vitals": "^4.1.1", "zod": "^3.23.8", "zustand": "^4.5.2" @@ -4260,6 +4262,30 @@ "tailwindcss": ">=3.0.0 || insiders" } }, + "node_modules/@tanstack/query-core": { + "version": "5.49.1", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.49.1.tgz", + "integrity": "sha512-JnC9ndmD1KKS01Rt/ovRUB1tmwO7zkyXAyIxN9mznuJrcNtOrkmOnQqdJF2ib9oHzc2VxHomnEG7xyfo54Npkw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, + "node_modules/@tanstack/react-query": { + "version": "5.49.2", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.49.2.tgz", + "integrity": "sha512-6rfwXDK9BvmHISbNFuGd+wY3P44lyW7lWiA9vIFGT/T0P9aHD1VkjTvcM4SDAIbAQ9ygEZZoLt7dlU1o3NjMVA==", + "dependencies": { + "@tanstack/query-core": "5.49.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": "^18.0.0" + } + }, "node_modules/@tanstack/react-virtual": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.5.0.tgz", @@ -7881,6 +7907,11 @@ "node": ">=4" } }, + "node_modules/globrex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==" + }, "node_modules/got": { "version": "11.8.6", "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", @@ -13946,6 +13977,25 @@ "code-block-writer": "^12.0.0" } }, + "node_modules/tsconfck": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.1.1.tgz", + "integrity": "sha512-00eoI6WY57SvZEVjm13stEVE90VkEdJAFGgpFLTsZbJyW/LwFQ7uQxJHWpZ2hzSWgCPKc9AnBnNP+0X7o3hAmQ==", + "bin": { + "tsconfck": "bin/tsconfck.js" + }, + "engines": { + "node": "^18 || >=20" + }, + "peerDependencies": { + "typescript": "^5.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/tsconfig-paths": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", @@ -14453,6 +14503,24 @@ "vite": "^2.6.0 || 3 || 4 || 5" } }, + "node_modules/vite-tsconfig-paths": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.3.2.tgz", + "integrity": "sha512-0Vd/a6po6Q+86rPlntHye7F31zA2URZMbH8M3saAZ/xR9QoGN/L21bxEGfXdWmFdNkqPpRdxFT7nmNe12e9/uA==", + "dependencies": { + "debug": "^4.1.1", + "globrex": "^0.1.2", + "tsconfck": "^3.0.3" + }, + "peerDependencies": { + "vite": "*" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + } + } + }, "node_modules/vite/node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", diff --git a/src/frontend/package.json b/src/frontend/package.json index 42752d9c4..0b29f0c70 100644 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -26,6 +26,7 @@ "@tabler/icons-react": "^3.6.0", "@tailwindcss/forms": "^0.5.7", "@tailwindcss/line-clamp": "^0.4.4", + "@tanstack/react-query": "^5.49.2", "@types/axios": "^0.14.0", "ace-builds": "^1.35.0", "ag-grid-community": "^31.3.2", @@ -73,6 +74,7 @@ "tailwindcss-animate": "^1.0.7", "uuid": "^10.0.0", "vite-plugin-svgr": "^4.2.0", + "vite-tsconfig-paths": "^4.3.2", "web-vitals": "^4.1.1", "zod": "^3.23.8", "zustand": "^4.5.2" @@ -133,4 +135,4 @@ "ua-parser-js": "^1.0.38", "vite": "^5.3.1" } -} \ No newline at end of file +} diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index 1a7178248..02f24e039 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -1,12 +1,10 @@ +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { useContext, useEffect, useState } from "react"; import { ErrorBoundary } from "react-error-boundary"; import { useNavigate } from "react-router-dom"; import "reactflow/dist/style.css"; import "./App.css"; import AlertDisplayArea from "./alerts/displayArea"; -import ErrorAlert from "./alerts/error"; -import NoticeAlert from "./alerts/notice"; -import SuccessAlert from "./alerts/success"; import CrashErrorComponent from "./components/crashErrorComponent"; import FetchErrorComponent from "./components/fetchErrorComponent"; import LoadingComponent from "./components/loadingComponent"; @@ -24,9 +22,10 @@ import useAlertStore from "./stores/alertStore"; import { useDarkStore } from "./stores/darkStore"; import useFlowsManagerStore from "./stores/flowsManagerStore"; import { useFolderStore } from "./stores/foldersStore"; -import { useGlobalVariablesStore } from "./stores/globalVariablesStore/globalVariables"; -import { useStoreStore } from "./stores/storeStore"; + export default function App() { + const queryClient = new QueryClient(); + useTrackLastVisitedPath(); const [fetchError, setFetchError] = useState(false); @@ -35,13 +34,8 @@ export default function App() { const { isAuthenticated, login, setUserData, setAutoLogin, getUser } = useContext(AuthContext); const setLoading = useAlertStore((state) => state.setLoading); - const fetchApiData = useStoreStore((state) => state.fetchApiData); const refreshVersion = useDarkStore((state) => state.refreshVersion); const refreshStars = useDarkStore((state) => state.refreshStars); - const setGlobalVariables = useGlobalVariablesStore( - (state) => state.setGlobalVariables, - ); - const checkHasStore = useStoreStore((state) => state.checkHasStore); const navigate = useNavigate(); const dark = useDarkStore((state) => state.dark); @@ -160,36 +154,38 @@ export default function App() { return ( //need parent component with width and height