Local Build and Deploy / deploy (push) Failing after 53s
Wire orphan routes into hub tabs, group Radio into primary/tools rows, show theme/language once on desktop, and remove duplicate page titles under AdminHubChrome. Co-authored-by: Cursor <[email protected]>
30 lines
813 B
TypeScript
30 lines
813 B
TypeScript
import Link from "next/link";
|
|
import { getTranslations } from "next-intl/server";
|
|
import { AdminMediaGrid } from "@/components/admin/media-grid";
|
|
import { redirect } from "next/navigation";
|
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
|
|
|
export default async function AdminMediaPage() {
|
|
const { session, permissions } = await getAdminContext();
|
|
if (!canAccess(permissions, PERMS.PAGES_VIEW, session.user.rank)) {
|
|
redirect("/admin");
|
|
}
|
|
|
|
const t = await getTranslations("pages.admin.media");
|
|
|
|
return (
|
|
<main>
|
|
<div className="flex justify-end mb-6">
|
|
<Link
|
|
href="/admin/articles"
|
|
className="text-sm theme-text-muted dark:theme-text-muted"
|
|
style={{ fontSize: "0.88rem" }}
|
|
>
|
|
← {t("articles")}
|
|
</Link>
|
|
</div>
|
|
<AdminMediaGrid />
|
|
</main>
|
|
);
|
|
}
|