refactor(admin): drop status strip from dashboard; full-bleed usage tab
- admin home is tournament section + tools list only - usage route matches sibling tabs (fullWidth, no shell padding); screen pads its own content so the tab bar stays flush
This commit is contained in:
@@ -2,24 +2,11 @@ import { createFileRoute } from "@tanstack/react-router";
|
||||
import { msg } from "@lingui/core/macro";
|
||||
import { AdminDashboard } from "@/features/admin";
|
||||
import { tournamentQueries } from "@/features/tournaments/queries";
|
||||
import { telemetryQueries } from "@/features/telemetry/queries";
|
||||
import { isoDay, lastNDays } from "@/features/telemetry/range";
|
||||
import { prefetchServerQuery } from "@/lib/tanstack-query/utils/prefetch";
|
||||
|
||||
export const Route = createFileRoute("/_authed/admin/")({
|
||||
beforeLoad: ({ context }) => {
|
||||
prefetchServerQuery(context.queryClient, tournamentQueries.current());
|
||||
prefetchServerQuery(context.queryClient, telemetryQueries.runtimeStatus());
|
||||
const month = lastNDays(30);
|
||||
prefetchServerQuery(
|
||||
context.queryClient,
|
||||
telemetryQueries.errorGroups({ from: month.from, to: month.to })
|
||||
);
|
||||
const today = isoDay(new Date());
|
||||
prefetchServerQuery(
|
||||
context.queryClient,
|
||||
telemetryQueries.rollups({ metrics: ["server_fn.count"], from: today, to: today })
|
||||
);
|
||||
},
|
||||
loader: () => ({
|
||||
header: {
|
||||
|
||||
@@ -10,6 +10,8 @@ export const Route = createFileRoute("/_authed/admin/telemetry/usage")({
|
||||
prefetchServerQuery(context.queryClient, telemetryQueries.rollups(defaultUsageParams()));
|
||||
},
|
||||
loader: () => ({
|
||||
withPadding: false,
|
||||
fullWidth: true,
|
||||
refresh: [telemetryQueries.rollups(defaultUsageParams()).queryKey],
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user