Skip to content

Commit

Permalink
Added redux. Began set up redux infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
dragoni7 committed Jul 10, 2024
1 parent aec7b34 commit 8738153
Show file tree
Hide file tree
Showing 11 changed files with 275 additions and 88 deletions.
142 changes: 141 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
"@emotion/styled": "^11.11.5",
"@mui/material": "^5.15.20",
"@mui/system": "^5.15.20",
"@reduxjs/toolkit": "^2.2.6",
"@tanstack/react-table": "^8.17.3",
"axios": "^1.7.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.23.1"
"react-redux": "^9.1.2",
"react-router-dom": "^6.23.1",
"redux": "^5.0.1"
},
"devDependencies": {
"@types/node": "^20.14.8",
Expand Down
19 changes: 11 additions & 8 deletions src/app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
import { RouterProvider } from "react-router-dom"
import { useMemo } from "react"
import { RouterProvider } from "react-router-dom";
import { useMemo } from "react";
import { createRouter } from "./routes";
import { Provider } from "react-redux";
import { store } from "../redux";

const AppRouter = () => {
const router = useMemo(() => createRouter(), [])
const router = useMemo(() => createRouter(), []);

return <RouterProvider router={router} />
}
return <RouterProvider router={router} />;
};

function App() {
return (
<AppRouter />
)
<Provider store={store}>
<AppRouter />
</Provider>
);
}

export default App;

4 changes: 2 additions & 2 deletions src/app/routes/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ const RightPane = styled("div")({

export const Dashboard = () => {
useEffect(() => {
getCurrentMembershipData();
getProfile(localStorage.getItem("primaryMembershipId") as string);
//getCurrentMembershipData();
//getProfile(localStorage.getItem("primaryMembershipId") as string);
}, []);

return (
Expand Down
Loading

0 comments on commit 8738153

Please sign in to comment.