MCPcopy Create free account
hub / github.com/triggerdotdev/jsonhero-web / PreviewJson

Function PreviewJson

app/components/Preview/Types/PreviewString.tsx:81–93  ·  view source on GitHub ↗
({
  value,
  format,
}: {
  value: string;
  format: JSONJSONFormat;
})

Source from the content-addressed store, hash-verified

79}
80
81function PreviewJson({
82 value,
83 format,
84}: {
85 value: string;
86 format: JSONJSONFormat;
87}) {
88 if (format.variant === "json5") {
89 return <></>;
90 }
91
92 return <CodeViewer code={JSON.stringify(JSON.parse(value), null, 2)} />;
93}
94
95function PreviewColor({
96 value,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected