import { RouterProvider, createBrowserRouter } from "react-router-dom";
import { LoginPage, LogoutPage, StartPage } from "./app";
import { CatalogList } from "./app/catalog";
import { DashboardPage } from "./app/dashboard";
import { ProtectedRoute } from "./components";
export const Routes = () => {
// Define public routes accessible to all users
const routesForPublic = [
{
path: "/",
Component: StartPage,
},
];
// Define routes accessible only to authenticated users
const routesForAuthenticatedOnly = [
{
path: "/home",
Component: DashboardPage,
},
{
path: "/catalog",
Component: CatalogList,
},
{
path: "/profile",
element: (
Profile