@@ -8,6 +8,8 @@ import WebsocketHandler from '@/components/server/WebsocketHandler';
88import { ServerContext } from '@/state/server' ;
99import { Provider } from 'react-redux' ;
1010import DatabasesContainer from '@/components/server/databases/DatabasesContainer' ;
11+ import FileManagerContainer from '@/components/server/files/FileManagerContainer' ;
12+ import { CSSTransition } from 'react-transition-group' ;
1113
1214const ServerRouter = ( { match, location } : RouteComponentProps < { id : string } > ) => {
1315 const server = ServerContext . useStoreState ( state => state . server . data ) ;
@@ -23,16 +25,18 @@ const ServerRouter = ({ match, location }: RouteComponentProps<{ id: string }>)
2325 return (
2426 < React . Fragment >
2527 < NavigationBar />
26- < div id = { 'sub-navigation' } >
27- < div className = { 'mx-auto' } style = { { maxWidth : '1200px' } } >
28- < div className = { 'items' } >
29- < NavLink to = { `${ match . url } ` } exact > Console</ NavLink >
30- < NavLink to = { `${ match . url } /files` } > File Manager</ NavLink >
31- < NavLink to = { `${ match . url } /databases` } > Databases</ NavLink >
32- < NavLink to = { `${ match . url } /users` } > User Management</ NavLink >
28+ < CSSTransition timeout = { 250 } classNames = { 'fade' } appear = { true } in = { true } >
29+ < div id = { 'sub-navigation' } >
30+ < div className = { 'mx-auto' } style = { { maxWidth : '1200px' } } >
31+ < div className = { 'items' } >
32+ < NavLink to = { `${ match . url } ` } exact > Console</ NavLink >
33+ < NavLink to = { `${ match . url } /files` } > File Manager</ NavLink >
34+ < NavLink to = { `${ match . url } /databases` } > Databases</ NavLink >
35+ < NavLink to = { `${ match . url } /users` } > User Management</ NavLink >
36+ </ div >
3337 </ div >
3438 </ div >
35- </ div >
39+ </ CSSTransition >
3640 < Provider store = { ServerContext . useStore ( ) } >
3741 < TransitionRouter >
3842 < div className = { 'w-full mx-auto' } style = { { maxWidth : '1200px' } } >
@@ -45,6 +49,7 @@ const ServerRouter = ({ match, location }: RouteComponentProps<{ id: string }>)
4549 < WebsocketHandler />
4650 < Switch location = { location } >
4751 < Route path = { `${ match . path } ` } component = { ServerConsole } exact />
52+ < Route path = { `${ match . path } /files` } component = { FileManagerContainer } exact />
4853 < Route path = { `${ match . path } /databases` } component = { DatabasesContainer } />
4954 </ Switch >
5055 </ React . Fragment >
0 commit comments