import React, { useState } from 'react'
import { useLocation, Navigate } from "react-router-dom"

export default (props) => {
  const { user } = props
  const location = useLocation()

  return props.children

  // return !user || !user.isLoged ?
  //   <Navigate to="/login" state={{ from: location }} replace /> :
  //   props.children
}
