# All files / src/components/Graphs/Landing index.tsx

0% Statements 0/16
100% Branches 0/0
0% Functions 0/6
0% Lines 0/11

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60

     import type { FC } from 'react';
    import loadable from '@loadable/component';
    import * as Urls from 'src/urls';
    import { Route, Switch } from 'react-router';
    import type { Page } from '@cutting/util';
    import { fallback } from 'src/components/Fallback/Fallback';

    // const Deaths = loadable(() => import('src/components/Confirmed'), {
    //   fallback,
    // });

    // const RateOfChange = loadable(() => import('src/components/RateOfChange'), {
    //   fallback,
    // });

    const IncreseFromPreviousDay = loadable(() => import('src/components/IncreseFromPreviousDay'), {
      fallback,
    });

    const DailyIncreaseUk = loadable(() => import('src/components/DailyIncreaseUk'), {
      fallback,
    });

    export const routable: Page[] = [
      {
        heading: 'Daily Increase In Scottish deaths',
        path: Urls.Covid19,
        component: DailyIncreaseUk,
        exact: true,
      },
      {
        heading: 'Increase in deaths',
        path: Urls.IncreaseInDeaths,
        component: IncreseFromPreviousDay,
        exact: true,
      },
      // {
      //   heading: 'Deaths',
      //   path: Urls.Deaths,
      //   component: Deaths,
      //   exact: true,
      // },
      // {
      //   heading: 'Rate of change',
      //   path: Urls.RateOfChange,
      //   component: RateOfChange,
      //   exact: true,
      // },
    ];

    export const Landing: FC = () => (
      <Switch>
        {routable.map(({ path, ...rest }) => {
          return <Route key={path} path={path} {...rest} />;
        })}
      </Switch>
    );

    export default Landing;