-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathadmin.tsx
More file actions
61 lines (58 loc) · 1.72 KB
/
Copy pathadmin.tsx
File metadata and controls
61 lines (58 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import { Outlet, useSearchParams } from "@remix-run/react";
import { typedjson } from "remix-typedjson";
import { LinkButton } from "~/components/primitives/Buttons";
import { Tabs } from "~/components/primitives/Tabs";
import { dashboardLoader } from "~/services/routeBuilders/dashboardBuilder";
export const loader = dashboardLoader(
{ authorization: { requireSuper: true } },
async ({ user }) => typedjson({ user })
);
export default function Page() {
const [searchParams] = useSearchParams();
const search = searchParams.get("search");
const searchSuffix = search ? `?search=${encodeURIComponent(search)}` : "";
return (
<div className="h-full w-full">
<div className="flex items-center justify-between p-4">
<Tabs
tabs={[
{
label: "Users",
to: `/admin${searchSuffix}`,
},
{
label: "Organizations",
to: `/admin/orgs${searchSuffix}`,
},
{
label: "Concurrency",
to: "/admin/concurrency",
},
{
label: "LLM Models",
to: "/admin/llm-models",
},
{
label: "Global Feature Flags",
to: "/admin/feature-flags",
},
{
label: "Notifications",
to: "/admin/notifications",
},
{
label: "Back office",
to: "/admin/back-office",
end: false,
},
]}
layoutId={"admin"}
/>
<LinkButton to="/" variant="tertiary/small" className="mb-4">
Back to me
</LinkButton>
</div>
<Outlet />
</div>
);
}