diff --git a/src/ApiUsage.tsx b/src/ApiUsage.tsx index 08d835c..49090b2 100644 --- a/src/ApiUsage.tsx +++ b/src/ApiUsage.tsx @@ -6,6 +6,7 @@ import RequestBodyEditor from './components/RequestBodyEditor'; import type { JsonSchema } from './components/RequestBodyEditor'; import CallHistoryRow from './components/CallHistoryRow'; import Breadcrumb from './components/Breadcrumb'; +import { JsonViewer } from './components/JsonViewer'; type ApiEndpoint = { id: string; diff --git a/src/components/JsonViewer.tsx b/src/components/JsonViewer.tsx new file mode 100644 index 0000000..3a4674b --- /dev/null +++ b/src/components/JsonViewer.tsx @@ -0,0 +1,10 @@ +import React from 'react'; + +export const JsonViewer: React.FC<{ data: any }> = ({ data }) => { + return ( +
{JSON.stringify(data, null, 2)}
+