@@ -7,10 +7,10 @@ import {
77 Paper ,
88 Box ,
99} from '@mui/material' ;
10- import { makeStyles } from 'tss-react/mui' ;
10+ import { makeStyles } from 'tss-react/mui' ;
1111import CssBaseline from '@mui/material/CssBaseline' ;
1212import * as React from 'react' ;
13- import { HashRouter , Navigate , Route , Routes } from 'react-router' ;
13+ import { HashRouter , Navigate , Route , Routes } from 'react-router' ;
1414import Header from './Header' ;
1515import Navigation from './Navigation' ;
1616import ScrollUpButton from '../common/ScrollUpButton' ;
@@ -23,12 +23,12 @@ import Plugins from '../plugin/Plugins';
2323import Login from '../user/Login' ;
2424import Messages from '../message/Messages' ;
2525import Users from '../user/Users' ;
26- import { observer } from 'mobx-react-lite' ;
27- import { ConnectionErrorBanner } from '../common/ConnectionErrorBanner' ;
28- import { useStores } from '../stores' ;
29- import { SnackbarProvider } from 'notistack' ;
26+ import { observer } from 'mobx-react-lite' ;
27+ import { ConnectionErrorBanner } from '../common/ConnectionErrorBanner' ;
28+ import { useStores } from '../stores' ;
29+ import { SnackbarProvider } from 'notistack' ;
3030import LoadingSpinner from '../common/LoadingSpinner' ;
31- import { isThemeKey , ThemeKey } from './theme' ;
31+ import { isThemeKey , ThemeKey } from './theme' ;
3232import DefaultPage from '../common/DefaultPage' ;
3333
3434const useStyles = makeStyles ( ) ( ( theme : Theme ) => ( {
@@ -62,14 +62,14 @@ const Layout = observer(() => {
6262 currentUser : {
6363 loggedIn,
6464 authenticating,
65- user : { name, admin } ,
65+ user : { name, admin} ,
6666 logout,
6767 tryReconnect,
6868 connectionErrorMessage,
6969 refreshKey,
7070 } ,
7171 } = useStores ( ) ;
72- const { classes } = useStyles ( ) ;
72+ const { classes} = useStyles ( ) ;
7373 const [ currentTheme , setCurrentTheme ] = React . useState < ThemeKey > ( ( ) => {
7474 const stored = window . localStorage . getItem ( localStorageThemeKey ) ;
7575 return isThemeKey ( stored ) ? stored : 'system' ;
@@ -85,7 +85,7 @@ const Layout = observer(() => {
8585 } ) ,
8686 [ paletteMode ]
8787 ) ;
88- const { version } = config . get ( 'version' ) ;
88+ const { version} = config . get ( 'version' ) ;
8989 const [ navOpen , setNavOpen ] = React . useState ( false ) ;
9090 const [ showSettings , setShowSettings ] = React . useState ( false ) ;
9191
@@ -122,12 +122,12 @@ const Layout = observer(() => {
122122 message = { connectionErrorMessage }
123123 />
124124 ) }
125- < div style = { { display : 'flex' , flexDirection : 'column' } } >
125+ < div style = { { display : 'flex' , flexDirection : 'column' } } >
126126 < CssBaseline />
127127 < Header
128128 admin = { admin }
129129 name = { name }
130- style = { { top : ! connectionErrorMessage ? 0 : connectionBannerHeight } }
130+ style = { { top : ! connectionErrorMessage ? 0 : connectionBannerHeight } }
131131 version = { version }
132132 loggedIn = { loggedIn }
133133 themeMode = { currentTheme }
@@ -137,7 +137,7 @@ const Layout = observer(() => {
137137 setNavOpen = { setNavOpen }
138138 navOpen = { navOpen }
139139 />
140- < div style = { { display : 'flex' } } >
140+ < div style = { { display : 'flex' } } >
141141 < Navigation
142142 loggedIn = { loggedIn }
143143 admin = { admin }
@@ -149,10 +149,11 @@ const Layout = observer(() => {
149149 setNavOpen = { setNavOpen }
150150 />
151151 < main
152- className = { `${ classes . content } ${ connectionErrorMessage
152+ className = { `${ classes . content } ${
153+ connectionErrorMessage
153154 ? classes . contentWithConnectionError
154155 : ''
155- } `} >
156+ } `} >
156157 < Routes >
157158 < Route path = "/login" element = { < Login /> } />
158159 < Route path = "/" element = { authed ( < Messages /> ) } />
@@ -197,7 +198,7 @@ const Layout = observer(() => {
197198} ) ;
198199
199200// eslint-disable-next-line
200- const Lazy = ( { component } : { component : ( ) => Promise < { default : React . ComponentType < any > } > } ) => {
201+ const Lazy = ( { component} : { component : ( ) => Promise < { default : React . ComponentType < any > } > } ) => {
201202 const Component = React . lazy ( component ) ;
202203
203204 return (
@@ -208,8 +209,8 @@ const Lazy = ({ component }: { component: () => Promise<{ default: React.Compone
208209} ;
209210
210211const RequireAuth : React . FC <
211- React . PropsWithChildren < { loggedIn : boolean ; authenticating : boolean } >
212- > = ( { children, authenticating, loggedIn } ) => {
212+ React . PropsWithChildren < { loggedIn : boolean ; authenticating : boolean } >
213+ > = ( { children, authenticating, loggedIn} ) => {
213214 if ( authenticating ) {
214215 return < LoadingSpinner /> ;
215216 }
@@ -219,8 +220,8 @@ const RequireAuth: React.FC<
219220 return < > { children } </ > ;
220221} ;
221222
222- export const RequireElevation = observer ( ( { children } : React . PropsWithChildren ) => {
223- const { elevateStore } = useStores ( ) ;
223+ export const RequireElevation = observer ( ( { children} : React . PropsWithChildren ) => {
224+ const { elevateStore} = useStores ( ) ;
224225
225226 if ( elevateStore . elevated ) {
226227 return < > { children } </ > ;
@@ -229,7 +230,7 @@ export const RequireElevation = observer(({ children }: React.PropsWithChildren)
229230 return (
230231 < DefaultPage title = "Authentication Required" maxWidth = { 400 } >
231232 < Paper elevation = { 6 } >
232- < Box sx = { { padding : 2 } } >
233+ < Box sx = { { padding : 2 } } >
233234 < ElevationForm />
234235 </ Box >
235236 </ Paper >
0 commit comments