admin route config
This commit is contained in:
@@ -2,5 +2,12 @@ import { createFileRoute } from "@tanstack/react-router"
|
||||
import { AdminPage } from "@/features/admin";
|
||||
|
||||
export const Route = createFileRoute("/_authed/admin/")({
|
||||
component: () => <AdminPage />,
|
||||
loader: () => ({
|
||||
header: {
|
||||
withBackButton: true,
|
||||
title: "Admin"
|
||||
},
|
||||
withPadding: false
|
||||
}),
|
||||
component: () => <AdminPage />
|
||||
})
|
||||
|
||||
@@ -1,20 +1,15 @@
|
||||
import { Title, List, Divider } from "@mantine/core";
|
||||
import { List } from "@mantine/core";
|
||||
import ListLink from "@/components/list-link";
|
||||
import Page from "@/components/page";
|
||||
import { DatabaseIcon, TreeStructureIcon, TrophyIcon, UsersFourIcon, UsersThreeIcon } from "@phosphor-icons/react";
|
||||
import ListButton from "@/components/list-button";
|
||||
|
||||
const AdminPage = () => {
|
||||
console.log(process.env.VITE_POCKETBASE_URL!)
|
||||
return (
|
||||
<Page noPadding>
|
||||
<Title pl='sm' order={2} mb="md">Admin</Title>
|
||||
<List>
|
||||
<ListLink label="Manage Tournaments" Icon={TrophyIcon} to="/admin/tournaments" />
|
||||
<ListButton label="Open Pocketbase" Icon={DatabaseIcon} onClick={() => window.location.replace(import.meta.env.VITE_POCKETBASE_URL! + "/_/")} />
|
||||
<ListLink label="Bracket Preview" Icon={TreeStructureIcon} to="/admin/preview" />
|
||||
</List>
|
||||
</Page>
|
||||
<List>
|
||||
<ListLink label="Manage Tournaments" Icon={TrophyIcon} to="/admin/tournaments" />
|
||||
<ListButton label="Open Pocketbase" Icon={DatabaseIcon} onClick={() => window.location.replace(import.meta.env.VITE_POCKETBASE_URL! + "/_/")} />
|
||||
<ListLink label="Bracket Preview" Icon={TreeStructureIcon} to="/admin/preview" />
|
||||
</List>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user