-
Notifications
You must be signed in to change notification settings - Fork 668
Expand file tree
/
Copy pathpage.tsx
More file actions
38 lines (32 loc) · 1.09 KB
/
page.tsx
File metadata and controls
38 lines (32 loc) · 1.09 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
import { getDeclinedPlugins, getPendingPlugins } from "@/data/queries";
import { isAdmin } from "@/utils/admin";
import { getSession } from "@/utils/supabase/auth";
import type { Metadata } from "next";
import { redirect } from "next/navigation";
import { PluginReviewTabs } from "./plugin-review-tabs";
export const metadata: Metadata = {
title: "Review Plugins | Admin",
};
export default async function AdminPluginsPage() {
const session = await getSession();
if (!session || !isAdmin(session.user.id)) {
redirect("/");
}
const [{ data: plugins }, { data: declined }] = await Promise.all([
getPendingPlugins({ since: "2026-03-16T00:00:00Z" }),
getDeclinedPlugins({ since: "2026-03-16T00:00:00Z" }),
]);
return (
<div className="min-h-screen px-6 pt-24 md:pt-32 pb-32">
<div className="mx-auto w-full max-w-3xl">
<div className="mb-10">
<h1 className="marketing-page-title mb-3">Review Plugins</h1>
</div>
<PluginReviewTabs
pending={plugins ?? []}
declined={declined ?? []}
/>
</div>
</div>
);
}