mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-24 16:38:19 +00:00
feat(react): Redirecting /assets to index (#2154)
This commit is contained in:
parent
11532a1cc3
commit
83cd89ad08
@ -35,7 +35,6 @@ export const Routes = (): JSX.Element => {
|
||||
<Switch>
|
||||
<ProtectedRoute isLoggedIn={isLoggedIn} exact path="/" render={() => <HomePage />} />
|
||||
<Route path={PageRoutes.LOG_IN} component={LogIn} />
|
||||
|
||||
{entityRegistry.getEntities().map((entity) => (
|
||||
<ProtectedRoute
|
||||
key={entity.getPathName()}
|
||||
@ -54,6 +53,8 @@ export const Routes = (): JSX.Element => {
|
||||
path={PageRoutes.BROWSE_RESULTS}
|
||||
render={() => <BrowseResultsPage />}
|
||||
/>
|
||||
{/* Starting the react app locally opens /assets by default. For a smoother dev experience, we'll redirect to the homepage */}
|
||||
<Route path={PageRoutes.ASSETS} component={() => <Redirect to="/" />} exact />
|
||||
<Route component={NoPageFound} />
|
||||
</Switch>
|
||||
</div>
|
||||
|
||||
@ -14,4 +14,5 @@ export enum PageRoutes {
|
||||
BROWSE = '/browse',
|
||||
BROWSE_RESULTS = '/browse/:type',
|
||||
DATASETS = '/datasets',
|
||||
ASSETS = '/assets',
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user