{"size": 1194, "ext": "js", "max_stars_repo_path": "src/containers/MainContainer.js", "max_stars_repo_name": "menstiler/carma-park-frontend", "max_stars_repo_stars_event_min_datetime": "2019-08-25T06:56:06.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-07T00:45:44.000Z", "max_issues_repo_path": "src/containers/MainContainer.js", "max_issues_repo_name": "menstiler/carma-park-frontend", "max_issues_repo_issues_event_min_datetime": "2020-01-16T14:08:41.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-10T20:51:24.000Z", "max_forks_repo_path": "src/containers/MainContainer.js", "max_forks_repo_name": "menstiler/carma-park-frontend", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 4, "max_issues_count": 4, "max_forks_count": null, "avg_line_length": 27.7674418605, "max_line_length": 99, "alphanum_fraction": 0.6256281407}
import React from 'react';
import MapContainer from './MapContainer'
import SpaceForm from '../components/SpaceForm'
import LoginForm from '../components/LoginForm'
import SignupForm from '../components/SignupForm'
import { connect } from 'react-redux'
import { Route, Switch } from 'react-router-dom'
import { Progress } from 'semantic-ui-react'
import '../styles/mainContainer.scss';

function MainContainer(props) {

  return (
    <>
      <Switch>
        <Route path="/login" render={(routerProps) => <LoginForm routerProps={routerProps}/>} />
        <Route path="/sign_up" render={(routerProps) => <SignupForm routerProps={routerProps}/>} />
        <Route path="/add_space" render={(routerProps) => {
          return (
            <>
              <Progress percent={props.progress} size='tiny'></Progress>
              <SpaceForm routerProps={routerProps} />
            </>
          )
        }} />
        <Route path="/" component={MapContainer} />
      </Switch>
    </>
  );
}

function msp(state) {
  return {
    currentUser: state.user.currentUser,
    loading: state.map.loading,
    progress: state.form.progress
  }
}

export default connect(msp, {

})(MainContainer);
