feat(dashboard): add reports

This commit is contained in:
2025-11-18 13:48:34 +02:00
parent dbcd1d7485
commit 126505fc88
32 changed files with 553 additions and 170 deletions
@@ -0,0 +1,22 @@
"use client";
import React from "react";
export interface ShowProps<T> {
when: T | null | undefined;
fallback?: React.ReactNode;
children: React.ReactNode | ((props: T) => React.ReactNode);
}
export function Show<T>(props: ShowProps<T>): React.ReactNode {
const { when, fallback, children } = props;
let result: React.ReactNode;
if (!when) {
result = fallback;
} else {
result = typeof children === "function" ? children(when) : children;
}
return result;
}