@@ -30,7 +30,7 @@ const ServerRouter = ({ match, location }: RouteComponentProps<{ id: string }>)
3030 useEffect ( ( ) => ( ) => clearServerState ( ) , [ clearServerState ] ) ;
3131
3232 return (
33- < React . Fragment >
33+ < React . Fragment key = { 'server-router' } >
3434 < NavigationBar />
3535 < CSSTransition timeout = { 250 } classNames = { 'fade' } appear = { true } in = { true } >
3636 < div id = { 'sub-navigation' } >
@@ -51,7 +51,7 @@ const ServerRouter = ({ match, location }: RouteComponentProps<{ id: string }>)
5151 < Can action = { 'backup.*' } >
5252 < NavLink to = { `${ match . url } /backups` } > Backups</ NavLink >
5353 </ Can >
54- < Can action = { [ 'settings.*' , 'file.sftp' ] } matchAny = { true } >
54+ < Can action = { [ 'settings.*' , 'file.sftp' ] } matchAny = { true } >
5555 < NavLink to = { `${ match . url } /settings` } > Settings</ NavLink >
5656 </ Can >
5757 </ div >
@@ -64,27 +64,25 @@ const ServerRouter = ({ match, location }: RouteComponentProps<{ id: string }>)
6464 < Spinner size = { 'large' } />
6565 </ div >
6666 :
67- < React . Fragment >
68- < Switch location = { location } >
69- < Route path = { `${ match . path } ` } component = { ServerConsole } exact />
70- < Route path = { `${ match . path } /files` } component = { FileManagerContainer } exact />
71- < Route
72- path = { `${ match . path } /files/:action(edit|new)` }
73- render = { props => (
74- < SuspenseSpinner >
75- < FileEditContainer { ...props as any } />
76- </ SuspenseSpinner >
77- ) }
78- exact
79- />
80- < Route path = { `${ match . path } /databases` } component = { DatabasesContainer } exact />
81- < Route path = { `${ match . path } /schedules` } component = { ScheduleContainer } exact />
82- < Route path = { `${ match . path } /schedules/:id` } component = { ScheduleEditContainer } exact />
83- < Route path = { `${ match . path } /users` } component = { UsersContainer } exact />
84- < Route path = { `${ match . path } /backups` } component = { BackupContainer } exact />
85- < Route path = { `${ match . path } /settings` } component = { SettingsContainer } exact />
86- </ Switch >
87- </ React . Fragment >
67+ < Switch location = { location } key = { 'server-switch' } >
68+ < Route path = { `${ match . path } ` } component = { ServerConsole } exact />
69+ < Route path = { `${ match . path } /files` } component = { FileManagerContainer } exact />
70+ < Route
71+ path = { `${ match . path } /files/:action(edit|new)` }
72+ render = { props => (
73+ < SuspenseSpinner >
74+ < FileEditContainer { ...props as any } />
75+ </ SuspenseSpinner >
76+ ) }
77+ exact
78+ />
79+ < Route path = { `${ match . path } /databases` } component = { DatabasesContainer } exact />
80+ < Route path = { `${ match . path } /schedules` } component = { ScheduleContainer } exact />
81+ < Route path = { `${ match . path } /schedules/:id` } component = { ScheduleEditContainer } exact />
82+ < Route path = { `${ match . path } /users` } component = { UsersContainer } exact />
83+ < Route path = { `${ match . path } /backups` } component = { BackupContainer } exact />
84+ < Route path = { `${ match . path } /settings` } component = { SettingsContainer } exact />
85+ </ Switch >
8886 }
8987 </ TransitionRouter >
9088 </ React . Fragment >
0 commit comments