This repository has no description
763 B
33 lines
1'use client';
2
3import { CodeHighlightTabs } from '@mantine/code-highlight';
4import { UrlCard, User } from '@semble/types';
5
6interface Props {
7 cardContent: UrlCard['cardContent'];
8 cardAuthor?: User;
9}
10
11export default function UrlCardDebugView(props: Props) {
12 return (
13 <CodeHighlightTabs
14 code={[
15 {
16 fileName: 'Content',
17 code: JSON.stringify(props.cardContent, null, 2),
18 language: 'json',
19 },
20 {
21 fileName: 'Author',
22 code: JSON.stringify(props.cardAuthor, null, 2),
23 language: 'json',
24 },
25 ]}
26 radius="md"
27 withBorder
28 onClick={(e) => e.stopPropagation()}
29 style={{ cursor: 'auto', zIndex: 0 }}
30 defaultExpanded={false}
31 />
32 );
33}