mirror of
https://github.com/lemeow125/React-NotesApp.git
synced 2024-11-17 06:29:28 +08:00
Readded Redux to track login state
This commit is contained in:
parent
0daa8cfa72
commit
61bdec145b
2 changed files with 13 additions and 3 deletions
5
src/Features/Redux/Store/Store.tsx
Normal file
5
src/Features/Redux/Store/Store.tsx
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
import { configureStore } from "@reduxjs/toolkit";
|
||||||
|
|
||||||
|
export default configureStore({
|
||||||
|
reducer: {},
|
||||||
|
});
|
|
@ -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>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue