diff --git a/packages/frontend/src/app.tsx b/packages/frontend/src/app.tsx index 2f81e20..25eb02c 100644 --- a/packages/frontend/src/app.tsx +++ b/packages/frontend/src/app.tsx @@ -5,12 +5,13 @@ import { hot } from 'react-hot-loader'; import { Redirect, Route, Switch } from 'react-router'; import { Router } from 'react-router-dom'; import history from './util/history'; -import { APP_ROUTES } from './util/routes'; +import { APP_ROUTES, getDisplayNameForRoute } from './util/routes'; import { ErrorBoundaryComponent, FeatureFlagsProvider } from 'elite-components'; import { Divider } from '@material-ui/core'; import { LinkDirectory } from './util/linkDirectory'; +import { NavigationBar } from 'components/general/NavigationBar'; -// Global bootstrap: install subsystems and load configuration +// Global bootstrap: load configuration const configuration: Configuration = getConfiguration(); export const AppComponent = () => ( @@ -18,11 +19,14 @@ export const AppComponent = () => ( - {APP_ROUTES.map((routeProps, index) => ( - + {APP_ROUTES.map((route, index) => ( + <> + + + ))} {/* Error 404 Fallback */} - + } /> diff --git a/packages/frontend/src/components/general/NavigationBar.tsx b/packages/frontend/src/components/general/NavigationBar.tsx new file mode 100644 index 0000000..5cad539 --- /dev/null +++ b/packages/frontend/src/components/general/NavigationBar.tsx @@ -0,0 +1,51 @@ +import * as React from 'react'; +import { + AppBar, + Toolbar, + makeStyles, + fade, + IconButton, + Theme, + createStyles, + Typography, + Button, +} from '@material-ui/core'; +import MenuIcon from '@material-ui/icons/Menu'; + +const useStyles = makeStyles((theme: Theme) => + createStyles({ + root: { + flexGrow: 1, + }, + menuButton: { + marginRight: theme.spacing(2), + }, + title: { + flexGrow: 1, + }, + }), +); + +export interface NavigationBarProps { + readonly title: string; +} + +export const NavigationBar = (props: NavigationBarProps) => { + const classes = useStyles(); + + return ( +
+ + + + + + + {props.title} + + + + +
+ ); +}; diff --git a/packages/frontend/src/index.html b/packages/frontend/src/index.html index 04e0890..cdb0bc3 100644 --- a/packages/frontend/src/index.html +++ b/packages/frontend/src/index.html @@ -49,7 +49,7 @@ Elite-SE | Sexy - +