import { createBrowserRouter, Navigate } from "react-router-dom"
import { ProtectedRoute, AdminRoute } from "./guards"
// Placeholder components — real pages will replace these
function LoginPage() {
return
Login
}
function BooksPage() {
return Books
}
function MyBorrowsPage() {
return My Borrows
}
function AdminBooksPage() {
return Admin / Books
}
function AdminBorrowsPage() {
return Admin / Borrows
}
function AdminIndexPage() {
return
}
export const router = createBrowserRouter([
{
path: "/login",
element: ,
},
{
path: "/",
element: ,
},
{
path: "/books",
element: ,
},
{
element: ,
children: [
{
path: "/my-borrows",
element: ,
},
],
},
{
element: ,
children: [
{
path: "/admin",
element: ,
},
{
path: "/admin/books",
element: ,
},
{
path: "/admin/borrows",
element: ,
},
],
},
])