admin route config
This commit is contained in:
@@ -2,5 +2,12 @@ import { createFileRoute } from "@tanstack/react-router"
|
|||||||
import { AdminPage } from "@/features/admin";
|
import { AdminPage } from "@/features/admin";
|
||||||
|
|
||||||
export const Route = createFileRoute("/_authed/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 ListLink from "@/components/list-link";
|
||||||
import Page from "@/components/page";
|
|
||||||
import { DatabaseIcon, TreeStructureIcon, TrophyIcon, UsersFourIcon, UsersThreeIcon } from "@phosphor-icons/react";
|
import { DatabaseIcon, TreeStructureIcon, TrophyIcon, UsersFourIcon, UsersThreeIcon } from "@phosphor-icons/react";
|
||||||
import ListButton from "@/components/list-button";
|
import ListButton from "@/components/list-button";
|
||||||
|
|
||||||
const AdminPage = () => {
|
const AdminPage = () => {
|
||||||
console.log(process.env.VITE_POCKETBASE_URL!)
|
|
||||||
return (
|
return (
|
||||||
<Page noPadding>
|
|
||||||
<Title pl='sm' order={2} mb="md">Admin</Title>
|
|
||||||
<List>
|
<List>
|
||||||
<ListLink label="Manage Tournaments" Icon={TrophyIcon} to="/admin/tournaments" />
|
<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! + "/_/")} />
|
<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" />
|
<ListLink label="Bracket Preview" Icon={TreeStructureIcon} to="/admin/preview" />
|
||||||
</List>
|
</List>
|
||||||
</Page>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user