import type { Page } from '@cutting/util'; import type { FC } from 'react'; import { Redirect, Route, Switch, useRouteMatch } from 'react-router'; import * as Urls from '../../urls'; import loadable from '@loadable/component'; import { fallback } from '../../components/Fallback/Fallback'; import { MathJaxProvider } from '@cutting/use-mathjax'; const Sine = loadable(() => import('../../components/Sine/Sine'), { fallback, }); const routes: Page[] = [{ heading: 'Sine wave', path: Urls.Sine, component: Sine, exact: true }]; const Default = () => ; export const Viz: FC = () => { const { path: currentPath } = useRouteMatch(); return ( {routes.map(({ path, ...rest }) => { return ; })} ); }; export default Viz;