2021-09-02 19:05:13 -07:00
|
|
|
import React from 'react';
|
2022-07-01 18:08:08 -04:00
|
|
|
import { Switch, Route } from 'react-router-dom';
|
2021-09-02 19:05:13 -07:00
|
|
|
import { Layout } from 'antd';
|
|
|
|
import { HomePage } from './home/HomePage';
|
2022-07-01 18:08:08 -04:00
|
|
|
import { SearchRoutes } from './SearchRoutes';
|
2024-01-17 18:15:36 -05:00
|
|
|
import EmbedRoutes from './EmbedRoutes';
|
|
|
|
import { PageRoutes } from '../conf/Global';
|
2021-09-02 19:05:13 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Container for all views behind an authentication wall.
|
|
|
|
*/
|
|
|
|
export const ProtectedRoutes = (): JSX.Element => {
|
|
|
|
return (
|
2024-03-08 12:16:53 -08:00
|
|
|
<Layout>
|
|
|
|
<Switch>
|
|
|
|
<Route exact path="/" render={() => <HomePage />} />
|
|
|
|
<Route path={PageRoutes.EMBED} render={() => <EmbedRoutes />} />
|
|
|
|
<Route path="/*" render={() => <SearchRoutes />} />
|
|
|
|
</Switch>
|
|
|
|
</Layout>
|
2021-09-02 19:05:13 -07:00
|
|
|
);
|
|
|
|
};
|