Rev 6613 | AutorÃa | Ultima modificación | Ver Log |
import React from 'react'import { Route, useHistory } from 'react-router-dom'const PublicRoute = ({ children, isAuthenticated, ...rest }) => {const history = useHistory()if (isAuthenticated) {history.push('/dashboard')return null}return <Route {...rest}>{children}</Route>}export default PublicRoute