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 | import { Grid } from "@chakra-ui/react";
import { FunctionComponent, lazy } from "react";
import { Switch } from "react-router-dom";
import { Footer } from "./components/Footer";
import { Header } from "./components/Header";
import { LazyRoute } from "./components/LazyRoute";
import { ROUTES } from "./constants/url";
const Contribute = lazy(() => import("./views/Contribute"));
const FAQ = lazy(() => import("./views/FAQ"));
const Home = lazy(() => import("./views/Home"));
const NotFound = lazy(() => import("./views/NotFound"));
const Packages = lazy(() => import("./views/Packages"));
const Random = lazy(() => import("./views/Random"));
const Search = lazy(() => import("./views/Search"));
const SiteTerms = lazy(() => import("./views/SiteTerms"));
export const App: FunctionComponent = () => {
return (
<Grid
as="main"
bg="bgPrimary"
gridTemplateColumns="1fr"
gridTemplateRows="auto 1fr auto"
h="100%"
maxW="100%"
minH="100vh"
>
<Header />
<Switch>
<LazyRoute component={Contribute} exact path={ROUTES.CONTRIBUTE} />
<LazyRoute component={FAQ} exact path={ROUTES.FAQ} />
<LazyRoute component={Home} exact path={ROUTES.HOME} />
<LazyRoute component={SiteTerms} exact path={ROUTES.SITE_TERMS} />
<LazyRoute component={Packages} path={ROUTES.PACKAGES} />
<LazyRoute component={Search} exact path={ROUTES.SEARCH} />
<LazyRoute component={Random} exact path={ROUTES.RANDOM} />
<LazyRoute component={NotFound} path="*" />
</Switch>
<Footer />
</Grid>
);
};
|