Readded Redux to track login state

This commit is contained in:
keannu125 2023-02-26 22:34:13 +08:00
parent 0daa8cfa72
commit 61bdec145b
2 changed files with 13 additions and 3 deletions

View file

@ -0,0 +1,5 @@
import { configureStore } from "@reduxjs/toolkit";
export default configureStore({
reducer: {},
});

View file

@ -10,6 +10,9 @@ import Login from "./Routes/Login/Login";
import { QueryClient, QueryClientProvider } from "react-query"; import { QueryClient, QueryClientProvider } from "react-query";
import { Provider } from "react-redux";
import Store from "./Features/Redux/Store/Store";
const queryClient = new QueryClient(); const queryClient = new QueryClient();
const router = createBrowserRouter([ const router = createBrowserRouter([
@ -33,9 +36,11 @@ const root = ReactDOM.createRoot(
root.render( root.render(
<React.StrictMode> <React.StrictMode>
<QueryClientProvider client={queryClient}> <Provider store={Store}>
<RouterProvider router={router} /> <QueryClientProvider client={queryClient}>
</QueryClientProvider> <RouterProvider router={router} />
</QueryClientProvider>
</Provider>
</React.StrictMode> </React.StrictMode>
); );