feat(telemetry): collections, universal server-fn coverage, beacon, client tracker
- activities indexes + client_events/client_errors/rollups/alerts collections - global function middleware via createStart; reads skipped on success - actor stash, denial dedup, control-flow error guards - api route logging, auth event overrides, beacon endpoint, web vitals - centralized admin role checks, shared skeletons, award-badges fix - extracted deriveRunState with tests
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import { Card, Group, Skeleton, Stack } from "@mantine/core";
|
||||
|
||||
export interface StatTileSkeletonProps {
|
||||
withCard?: boolean;
|
||||
align?: "row" | "column";
|
||||
numberWidth?: number;
|
||||
numberHeight?: number;
|
||||
labelWidth?: number;
|
||||
labelHeight?: number;
|
||||
}
|
||||
|
||||
export const StatTileSkeleton = ({
|
||||
withCard = false,
|
||||
align = "column",
|
||||
numberWidth = align === "row" ? 36 : 48,
|
||||
numberHeight = 28,
|
||||
labelWidth = align === "row" ? 110 : 80,
|
||||
labelHeight = align === "row" ? 14 : 12,
|
||||
}: StatTileSkeletonProps) => {
|
||||
const content =
|
||||
align === "row" ? (
|
||||
<Group gap="xs" align="baseline">
|
||||
<Skeleton height={numberHeight} width={numberWidth} radius="sm" />
|
||||
<Skeleton height={labelHeight} width={labelWidth} radius="sm" />
|
||||
</Group>
|
||||
) : (
|
||||
<Stack gap={4} align="center">
|
||||
<Skeleton height={numberHeight} width={numberWidth} radius="sm" />
|
||||
<Skeleton height={labelHeight} width={labelWidth} radius="sm" />
|
||||
</Stack>
|
||||
);
|
||||
|
||||
if (!withCard) return content;
|
||||
|
||||
return (
|
||||
<Card withBorder radius="md" p="md">
|
||||
{content}
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
||||
export default StatTileSkeleton;
|
||||
Reference in New Issue
Block a user