({ data }: { data: object })
| 1 | import { cn } from "react-lib-tools"; |
| 2 | |
| 3 | export function DebugData({ data }: { data: object }) { |
| 4 | return ( |
| 5 | <pre |
| 6 | className={cn( |
| 7 | "p-2 resize-none rounded-md font-mono text-xs", |
| 8 | "border border-2 border-slate-800 focus:outline-none focus:border-sky-700" |
| 9 | )} |
| 10 | > |
| 11 | <code className="text-xs">{JSON.stringify(data, replacer, 2)}</code> |
| 12 | </pre> |
| 13 | ); |
| 14 | } |
| 15 | |
| 16 | function replacer(_key: string, value: unknown) { |
| 17 | if (typeof value === "number") { |
nothing calls this directly
no outgoing calls
no test coverage detected