feat: add collection views

This commit is contained in:
Steven
2023-11-12 10:47:49 +08:00
parent 626b0df21c
commit 83970d5d55
18 changed files with 887 additions and 83 deletions

View File

@ -1,4 +1,6 @@
import { createBrowserRouter } from "react-router-dom";
import CollectionDashboard from "@/pages/CollectionDashboard";
import CollectionSpace from "@/pages/CollectionSpace";
import NotFound from "@/pages/NotFound";
import SignIn from "@/pages/SignIn";
import SignUp from "@/pages/SignUp";
@ -17,11 +19,11 @@ const router = createBrowserRouter([
element: <App />,
children: [
{
path: "auth",
path: "/auth",
element: <SignIn />,
},
{
path: "auth/signup",
path: "/auth/signup",
element: <SignUp />,
},
{
@ -29,9 +31,13 @@ const router = createBrowserRouter([
element: <Root />,
children: [
{
path: "",
path: "/",
element: <Home />,
},
{
path: "/collections",
element: <CollectionDashboard />,
},
{
path: "/shortcut/:shortcutId",
element: <ShortcutDetail />,
@ -54,6 +60,10 @@ const router = createBrowserRouter([
},
],
},
{
path: "c/:collectionName",
element: <CollectionSpace />,
},
{
path: "*",
element: <NotFound />,