Skip to content

Commit

Permalink
Added back default route with exact path matching
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomThomson committed Jan 5, 2021
1 parent ffa988d commit bb25d71
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import React from 'react';
import { I18nProvider } from '@kbn/i18n/react';
import { parse, ParsedQuery } from 'query-string';
import { render, unmountComponentAtNode } from 'react-dom';
import { Switch, Route, RouteComponentProps, HashRouter } from 'react-router-dom';
import { Switch, Route, RouteComponentProps, HashRouter, Redirect } from 'react-router-dom';

import { DashboardListing } from './listing';
import { DashboardApp } from './dashboard_app';
Expand Down Expand Up @@ -209,6 +209,9 @@ export async function mountApp({
render={renderDashboard}
/>
<Route exact path={DashboardConstants.LANDING_PAGE_PATH} render={renderListingPage} />
<Route exact path="/">
<Redirect to={DashboardConstants.LANDING_PAGE_PATH} />
</Route>
<Route render={renderNoMatch} />
</Switch>
</HashRouter>
Expand Down

0 comments on commit bb25d71

Please sign in to comment.