Widen the admin home so its cards run three across

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-30 13:12:55 -05:00
parent c76df021a8
commit 175a18976d
2 changed files with 9 additions and 3 deletions

View file

@ -10,6 +10,9 @@
One block per header group, in the same order: Data, Pages,
Forms, Tools, and Panel, which only exists for superadmins.
It asks for the wide admin column (adminWidth.tsx), like the
editor, so the cards run three across on a wide screen.
The right-hand panel is deliberately inert. Nothing here
fetches, so the landing page can't be slow or half-broken on
arrival; anything live (open feedback count, last-edited
@ -19,6 +22,7 @@
import { ArrowRight, ArrowUpRight } from "@phosphor-icons/react";
import { Link } from "react-router-dom";
import { useAuth } from "../../lib/auth.tsx";
import { useWideAdminPage } from "../../lib/adminWidth.tsx";
import { SITE_VERSION } from "../../lib/version.ts";
import { ROLE_LABELS, isSuper } from "../../lib/roles.ts";
import { DATA_NAV, FORMS_NAV, PAGES_NAV, PANEL_NAV, TOOLS_NAV, target, visibleItems } from "./adminNav.ts";
@ -81,7 +85,7 @@ function CardBlock({ title, blurb, children }) {
<h2 className="text-lg font-semibold text-link">{title}</h2>
{blurb && <p className="text-sm text-muted">{blurb}</p>}
</div>
<div className="mt-4 grid gap-4 sm:grid-cols-2">{children}</div>
<div className="mt-4 grid gap-4 sm:grid-cols-2 xl:grid-cols-3">{children}</div>
</div>
);
}
@ -111,6 +115,7 @@ const QUICK_ADD = [
export default function AdminHome() {
const { user } = useAuth();
const role = ROLE_LABELS[user?.role] ?? user?.role;
useWideAdminPage();
return (
<div className="grid gap-8 lg:grid-cols-[1fr_17rem] lg:items-start">