Skip to content

Commit

Permalink
Refactor Navigation to use react-router-dom v6 (#250)
Browse files Browse the repository at this point in the history
Signed-off-by: Griffin-Sullivan <gsulliva@redhat.com>
  • Loading branch information
Griffin-Sullivan authored Aug 8, 2024
1 parent 93f542d commit 869fb58
Show file tree
Hide file tree
Showing 13 changed files with 285 additions and 566 deletions.
183 changes: 59 additions & 124 deletions clients/ui/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion clients/ui/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"prettier": "^3.3.3",
"prop-types": "^15.8.1",
"raw-loader": "^4.0.2",
"react-router-dom": "^5.3.4",
"react-router-dom": "^6.4.1",
"regenerator-runtime": "^0.14.1",
"rimraf": "^5.0.7",
"serve": "^14.2.1",
Expand Down
48 changes: 48 additions & 0 deletions clients/ui/frontend/src/app/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import * as React from 'react';
import '@patternfly/react-core/dist/styles/base.css';
import AppRoutes from '@app/AppRoutes';
import '@app/app.css';
import {
Flex,
Masthead,
MastheadContent,
MastheadToggle,
Page,
PageToggleButton,
Title
} from '@patternfly/react-core';
import NavSidebar from './NavSidebar';
import { BarsIcon } from '@patternfly/react-icons';

const App: React.FC = () => {
const masthead = (
<Masthead>
<MastheadToggle>
<PageToggleButton id="page-nav-toggle" variant="plain" aria-label="Dashboard navigation">
<BarsIcon />
</PageToggleButton>
</MastheadToggle>

<MastheadContent>
<Flex>
<Title headingLevel="h2" size="3xl">
Kubeflow Model Registry UI
</Title>
</Flex>
</MastheadContent>
</Masthead>
);

return (
<Page
mainContainerId='primary-app-container'
masthead={masthead}
isManagedSidebar
sidebar={<NavSidebar />}
>
<AppRoutes />
</Page>
);
};

export default App;
Loading

0 comments on commit 869fb58

Please sign in to comment.