Skip to content

Commit

Permalink
Revert "add Info what is Loading"
Browse files Browse the repository at this point in the history
This reverts commit 8885483.
  • Loading branch information
T0biii committed Mar 3, 2024
1 parent 370e996 commit 3d374d7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
3 changes: 1 addition & 2 deletions website/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export const App = observer(class App extends React.Component {


render() {

const darkLightTheme = createTheme({
palette: {
mode: AppState.darkMode ? 'dark' : 'light',
Expand Down Expand Up @@ -55,7 +54,7 @@ export const App = observer(class App extends React.Component {
<CssBaseline />
<Navigation />
<Box component="div" m={2}>
<Loading message="Page" />
<Loading />
</Box>
</ThemeProvider>
</Router>
Expand Down
2 changes: 1 addition & 1 deletion website/src/components/Devices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const Devices = observer(

render() {
if (!this.devices.current) {
return <Loading message="devices"/>;
return <Loading />;
}
return (
<Grid container spacing={3} justifyContent="center">
Expand Down
8 changes: 2 additions & 6 deletions website/src/components/Loading.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import CircularProgress from '@mui/material/CircularProgress';
import Box from '@mui/material/Box';

interface LoadingProps {
message: String;
}

export function Loading({ message }: LoadingProps) {
export function Loading() {

return (
<Box component="div" m={4} display="flex" flexDirection="column" justifyContent="center" alignItems="center" minHeight="50vh" >
<Box mb={5}>Loading { message } ...</Box>
<Box mb={5}>Loading...</Box>
<CircularProgress color="primary" />
</Box>
);
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/admin/AllDevices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const AllDevices = observer(class AllDevices extends React.Component {

render() {
if (!this.devices.current || !this.users.current) {
return <Loading message="all devices"/>;
return <Loading />;
}

const users = this.users.current;
Expand Down

0 comments on commit 3d374d7

Please sign in to comment.