{"size": 616, "ext": "js", "max_stars_repo_path": "src/containers/TheLayout.js", "max_stars_repo_name": "md-alif10000/mern-admin", "max_stars_repo_stars_event_min_datetime": "2021-04-09T04:06:25.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-09T04:06:25.000Z", "max_issues_repo_path": "src/containers/TheLayout.js", "max_issues_repo_name": "md-alif10000/mern-admin", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/containers/TheLayout.js", "max_forks_repo_name": "md-alif10000/mern-admin", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.6666666667, "max_line_length": 62, "alphanum_fraction": 0.5876623377}
import React from 'react'
import {useSelector} from 'react-redux'
import { Redirect } from 'react-router';
import {
  TheContent,
  TheSidebar,
  TheFooter,
  TheHeader
} from './index'


const TheLayout = () => {

    const auth = useSelector((state) => state.auth);
    if (!auth.authenticate) return <Redirect to={"/login"} />;
   

  return (
    <div className="c-app c-default-layout">
      <TheSidebar/>
      <div className="c-wrapper">
        <TheHeader/>
        <div className="c-body">
          <TheContent/>
        </div>
        <TheFooter/>
      </div>
    </div>
  )
}

export default TheLayout
