-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add rollupOptions to split third party dependencies into separate fils to decrease initial bundle size * migrate from react-router-dom's old route based system to the new 'data' router convert nested routes (site and manifest) to new browser router definition convert features to lazy loaded react components routed though rrd createBrowserRouter function * adjust feature directory exports so the feature components can be lazy loaded * implement private route and login page using the createBrowserRouter * move manifest features to separate directories and use dynamic import to implement code splitting * move static assets to new static directory
- Loading branch information
1 parent
b8d47d3
commit 7f0843d
Showing
47 changed files
with
216 additions
and
176 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
.../components/PrivateRoute/PrivateRoute.tsx → ...nt/src/components/Layout/PrivateRoute.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { ErrorBoundary } from 'components/ErrorBoundary'; | ||
import { Sidebar } from './Sidebar'; | ||
import { TopNav } from './TopNav'; | ||
import { PrivateRoute } from './PrivateRoute'; | ||
import React from 'react'; | ||
import { Container } from 'react-bootstrap'; | ||
import { Outlet } from 'react-router-dom'; | ||
|
||
export function Root() { | ||
return ( | ||
<div className="App"> | ||
<PrivateRoute> | ||
<TopNav /> | ||
<div id="layoutSidenav"> | ||
<Sidebar /> | ||
<Container fluid id="layoutSidenav_content"> | ||
<ErrorBoundary> | ||
<Outlet /> | ||
</ErrorBoundary> | ||
</Container> | ||
</div> | ||
</PrivateRoute> | ||
</div> | ||
); | ||
} |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
client/src/components/Nav/Sidebar.spec.tsx → ...nt/src/components/Layout/Sidebar.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
client/src/components/Nav/TopNav.spec.tsx → client/src/components/Layout/TopNav.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import happyRobot from '/static/robot-bad-sign.jpg'; | ||
import { HtCard } from 'components/Ht'; | ||
import React from 'react'; | ||
import { Button } from 'react-bootstrap'; | ||
import { useNavigate } from 'react-router-dom'; | ||
|
||
export const NotFound = () => { | ||
const navigate = useNavigate(); | ||
return ( | ||
<HtCard> | ||
<HtCard.Header title="Page not found" /> | ||
<HtCard.Body className="d-grid justify-content-center"> | ||
<img src={happyRobot} alt="happy robot" width={200} height={'auto'} /> | ||
<h1 className="display-1 d-flex justify-content-center">404</h1> | ||
<h4>Resource not found</h4> | ||
</HtCard.Body> | ||
<HtCard.Footer> | ||
<Button onClick={() => navigate(-1)}>Return</Button> | ||
</HtCard.Footer> | ||
</HtCard> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { NotFound as Component } from './NotFound'; | ||
|
||
export { Component }; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { SiteDetails as Component } from 'features/SiteDetails/SiteDetails'; | ||
|
||
export { Component }; |
2 changes: 1 addition & 1 deletion
2
...es/haztrakSite/SiteList/SiteList.spec.tsx → ...t/src/features/SiteList/SiteList.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { SiteList as Component } from 'features/SiteList/SiteList'; | ||
|
||
export { Component }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { UnderConstruction } from 'features/comingSoon/UnderConstruction'; | ||
import { UnderConstruction as Component } from 'features/comingSoon/UnderConstruction'; | ||
|
||
export { UnderConstruction }; | ||
export { Component }; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { About } from './About'; | ||
import { About as Component } from './About'; | ||
|
||
export { About }; | ||
export { Component }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { Home } from './Home'; | ||
import { Home as Component } from './Home'; | ||
|
||
export { Home }; | ||
export { Component }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { ManifestDetails as Component } from './ManifestDetails'; | ||
|
||
export { Component }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rc/features/manifest/NewManifest.spec.tsx → ...eatures/manifestList/NewManifest.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { ManifestList as Component } from './ManifestList'; | ||
|
||
export { Component }; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { NewManifest as Component } from './NewManifest'; | ||
|
||
export { Component }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { Notifications } from './Notifications'; | ||
import { Notifications as Component } from './Notifications'; | ||
|
||
export { Notifications }; | ||
export { Component }; |
Oops, something went wrong.