{"size": 1390, "ext": "js", "max_stars_repo_path": "src/router.js", "max_stars_repo_name": "Chesties69/leopatrone", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/router.js", "max_issues_repo_name": "Chesties69/leopatrone", "max_issues_repo_issues_event_min_datetime": "2020-05-11T02:28:57.000Z", "max_issues_repo_issues_event_max_datetime": "2021-03-05T12:52:20.000Z", "max_forks_repo_path": "src/router.js", "max_forks_repo_name": "Chesties69/leopatrone", "max_forks_repo_forks_event_min_datetime": "2020-05-01T21:54:02.000Z", "max_forks_repo_forks_event_max_datetime": "2020-05-01T21:54:02.000Z"}
{"max_stars_count": null, "max_issues_count": 8, "max_forks_count": 1, "avg_line_length": 27.2549019608, "max_line_length": 72, "alphanum_fraction": 0.6251798561}
import App from 'App/App';
import {
  BASE_URL,
  ROUTE_HOME,
  ROUTE_WEDDINGS,
  ROUTE_LIFESTYLE,
  ROUTE_PORTRAITS,
  ROUTE_ABOUT,
  ROUTE_CONTACT,
} from 'utils/constants';
import { BrowserRouter, Switch, Route } from 'react-router-dom';
import React, { Suspense, lazy } from 'react';

const Home = lazy(() => {
  return import('pages/Home/Home');
});
const Weddings = lazy(() => {
  return import('pages/Weddings/Weddings');
});
const Lifestyle = lazy(() => {
  return import('pages/Lifestyle/Lifestyle');
});
const Portraits = lazy(() => {
  return import('pages/Portraits/Portraits');
});
const About = lazy(() => {
  return import('pages/About/About');
});
const Contact = lazy(() => {
  return import('pages/Contact/Contact');
});

export default function Router() {
  return (
    <BrowserRouter basename={BASE_URL}>
      <App>
        <Suspense fallback={<div />}>
          <Switch>
            <Route component={Home} exact path={ROUTE_HOME} />
            <Route component={Weddings} exact path={ROUTE_WEDDINGS} />
            <Route component={Lifestyle} exact path={ROUTE_LIFESTYLE} />
            <Route component={Portraits} exact path={ROUTE_PORTRAITS} />
            <Route component={About} exact path={ROUTE_ABOUT} />
            <Route component={Contact} exact path={ROUTE_CONTACT} />
          </Switch>
        </Suspense>
      </App>
    </BrowserRouter>
  );
}
