Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into feature/bump-reac…
Browse files Browse the repository at this point in the history
…t-and-react-dom-and-types
  • Loading branch information
nwaldispuehl committed Sep 20, 2023
2 parents 85ebc18 + 3a9f64f commit b274de5
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 169 deletions.
214 changes: 56 additions & 158 deletions website/package-lock.json

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

4 changes: 2 additions & 2 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
"@material-ui/lab": "^4.0.0-alpha.61",
"@mui/icons-material": "^5.14.3",
"@mui/icons-material": "^5.14.6",
"@mui/material": "^5.14.5",
"common-tags": "^1.8.2",
"date-fns": "^2.30.0",
Expand All @@ -25,7 +25,7 @@
"qrcode": "^1.5.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^5.3.4",
"react-router-dom": "^6.15.0",
"react-scripts": "^5.0.1",
"tweetnacl-ts": "^1.0.3"
},
Expand Down
10 changes: 5 additions & 5 deletions website/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import CssBaseline from '@material-ui/core/CssBaseline';
import Box from '@material-ui/core/Box';
import Navigation from './components/Navigation';
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import { observer } from 'mobx-react';
import { grpc } from './Api';
import { AppState } from './AppState';
Expand All @@ -23,14 +23,14 @@ export const App = observer(class App extends React.Component {
<CssBaseline />
<Navigation />
<Box component="div" m={2}>
<Switch>
<Route exact path="/" component={YourDevices} />
<Routes>
<Route path="/" element={<YourDevices />} />
{AppState.info.isAdmin && (
<>
<Route exact path="/admin/all-devices" component={AllDevices} />
<Route path="/admin/all-devices" element={<AllDevices />} />
</>
)}
</Switch>
</Routes>
</Box>
</Router>
);
Expand Down
Loading

0 comments on commit b274de5

Please sign in to comment.