import { Routes, Route } from "react-router-dom";
import useAuth from '../Auth/useAuth';
import React from 'react'

function Not(){
    <div>
        <h1>404</h1>
    </div>
}

function Loveisforever(){
    <div>
        <h1>404</h1>
    </div>
}

export function Private ( props ) {

    let auth = useAuth();

    return(
        <React.Fragment>
            {
                auth.isLogged() ? 
                    ( <Route path="main" element={<Not/>}/> ) 
                : ( <Route path="main" element={<Loveisforever/>}/>)        
            }
        </React.Fragment>
    )

}
