mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-25 22:44:19 +00:00
14 lines
326 B
JavaScript
14 lines
326 B
JavaScript
import React, { useContext } from "react"
|
|
import ContextUser from "../contexts/ContextUser"
|
|
import { Redirect } from "react-router"
|
|
|
|
|
|
export default function PageRoot() {
|
|
const { state } = useContext(ContextUser)
|
|
|
|
if(!state) {
|
|
return <Redirect to={"/login"}/>
|
|
}
|
|
|
|
return <Redirect to={"/dashboard"}/>
|
|
}
|