mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-09 16:02:13 +00:00
25 lines
800 B
TypeScript
25 lines
800 B
TypeScript
import React from 'react';
|
|
import { Switch, Route } from 'react-router-dom';
|
|
import { Layout } from 'antd';
|
|
import { HomePage } from './home/HomePage';
|
|
import AppConfigProvider from '../AppConfigProvider';
|
|
import { SearchRoutes } from './SearchRoutes';
|
|
|
|
/**
|
|
* Container for all views behind an authentication wall.
|
|
*/
|
|
export const ProtectedRoutes = (): JSX.Element => {
|
|
return (
|
|
<AppConfigProvider>
|
|
<Layout style={{ height: '100%', width: '100%' }}>
|
|
<Layout>
|
|
<Switch>
|
|
<Route exact path="/" render={() => <HomePage />} />
|
|
<Route path="/*" render={() => <SearchRoutes />} />
|
|
</Switch>
|
|
</Layout>
|
|
</Layout>
|
|
</AppConfigProvider>
|
|
);
|
|
};
|