 
import React, { useContext, useState } from 'react';
import reactLogo from '@/assets/react.svg'; 

import { Outlet,useNavigate } from 'react-router-dom'; 
function Layout(props:any) { 
    const navigate = useNavigate();   
   
    const topage = (path:any)=>{
        navigate(path, { replace: true });
    }
  return (
    <>
      <div>  
        <div>
         <a onClick={()=>topage('/home')}>home</a>
         <a onClick={()=>{topage('/about')}}>about</a>
        </div>
        <div> 
           <Outlet />
        </div>
       </div> 
    </>
  );
} 

export default Layout;
