import React from 'react';
import { useRoutes, Navigate } from "react-router-dom";
import Home from "../components/Home";
import About from "../components/About";
import AddOrEdit from "../components/AddOrEdit";
import Detail from "../components/Detail";
import Email from "../components/Email";
import Tel from "../components/Tel";
function Router(props) {
return useRoutes([
{
path: "/home",
element: ,
},
{
path: "/about",
element: ,
children : [
{
path : "email",
element :
},
{
path : "tel",
element :
},
{
path : "",
element:
}
]
},
{
path: "/add",
element: ,
},
{
path: "/detail/:id",
element: ,
},
{
path: "/edit/:id",
element: ,
},
{
path: "/",
element:
}
]);
}
export default Router;