From aa5d59b1c6307a3a53b07f76ea2c9fbcd9c3e76a Mon Sep 17 00:00:00 2001 From: Natalia Bandurova Date: Thu, 3 Oct 2024 01:27:06 +0300 Subject: [PATCH] chore: add redux --- frontend/package.json | 2 ++ frontend/src/App.js | 12 ------------ frontend/src/App.jsx | 28 ++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 12 deletions(-) delete mode 100644 frontend/src/App.js create mode 100644 frontend/src/App.jsx diff --git a/frontend/package.json b/frontend/package.json index 96fd488..14bf690 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -4,6 +4,7 @@ "private": true, "proxy": "http://localhost:5001", "dependencies": { + "@reduxjs/toolkit": "^2.2.7", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", @@ -13,6 +14,7 @@ "react": "^18.3.1", "react-bootstrap": "^2.10.5", "react-dom": "^18.3.1", + "react-redux": "^9.1.2", "react-router-dom": "^6.26.2", "react-scripts": "5.0.1", "web-vitals": "^2.1.4" diff --git a/frontend/src/App.js b/frontend/src/App.js deleted file mode 100644 index bfecd82..0000000 --- a/frontend/src/App.js +++ /dev/null @@ -1,12 +0,0 @@ -import './App.css'; -import { Outlet } from 'react-router-dom'; -import Header from './components/Header'; - -const App = () => ( - <> -
- - -); - -export default App; diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx new file mode 100644 index 0000000..7db48d3 --- /dev/null +++ b/frontend/src/App.jsx @@ -0,0 +1,28 @@ +import './App.css'; +import { Outlet } from 'react-router-dom'; +import Header from './components/Header'; + +// const AuthProvider = ({ children }) => { +// const [loggedIn, setLoggedIn] = useState(false); + +// const logIn = () => setLoggedIn(true); +// const logOut = () => { +// localStorage.removeItem('userId'); +// setLoggedIn(false); +// }; + +// return ( +// +// {children} +// +// ); +// }; + +const App = () => ( + <> +
+ + +); + +export default App;