{"size": 807, "ext": "js", "max_stars_repo_path": "src/layouts/Landing.js", "max_stars_repo_name": "zhouguoqing917/react-material-ui", "max_stars_repo_stars_event_min_datetime": "2019-09-03T07:12:04.000Z", "max_stars_repo_stars_event_max_datetime": "2019-09-03T07:12:04.000Z", "max_issues_repo_path": "src/layouts/Landing.js", "max_issues_repo_name": "zhouguoqing917/react-material-ui", "max_issues_repo_issues_event_min_datetime": "2020-09-07T03:01:35.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-12T20:03:36.000Z", "max_forks_repo_path": "src/layouts/Landing.js", "max_forks_repo_name": "zhouguoqing917/react-material-ui", "max_forks_repo_forks_event_min_datetime": "2019-09-02T07:36:17.000Z", "max_forks_repo_forks_event_max_datetime": "2019-09-02T07:36:17.000Z"}
{"max_stars_count": 1, "max_issues_count": 4, "max_forks_count": 1, "avg_line_length": 20.6923076923, "max_line_length": 63, "alphanum_fraction": 0.6294919455}
import React from "react";
import { Switch, Route, Redirect } from "react-router-dom";
// creates a beautiful scrollbar
// @material-ui/core components
import { makeStyles } from "@material-ui/core/styles";

import styles from "assets/jss/styles/layouts/landingStyle.js";

import landingRoutes from "../routes/landingRoutes";

let ps;

const switchRoutes = (
  <Switch>
    {landingRoutes.map((prop, key) => {
      return (
        <Route
          path={prop.layout + prop.path}
          component={prop.component}
          key={key}
        />
      );
    })}
  </Switch>
);

const useStyles = makeStyles(styles);

export default function Landing({ ...rest }) {
  // styles
  const classes = useStyles();

  return (
    <div className={classes.landingWrapper}>
      {switchRoutes}
    </div>
  );
}
