summaryrefslogtreecommitdiffstats
path: root/src/components/Content/Content.tsx
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <tom@vanderlee.io>2025-10-17 15:52:17 +0200
committerGravatar Tom van der Lee <tom@vanderlee.io>2025-10-17 15:52:17 +0200
commit06ec1f69e11fc52c0e2c6b5f12c3c89b9ef18436 (patch)
treefba675613f56303e692fdab0b7d3274a3bb22357 /src/components/Content/Content.tsx
parentda3947e721ceb1cbc748aa1c74fe809ccbc47c2f (diff)
downloadclient-main.tar.gz
client-main.tar.bz2
client-main.zip
Added json view of encoded paramsv2.2.0main
Diffstat (limited to 'src/components/Content/Content.tsx')
-rw-r--r--src/components/Content/Content.tsx15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/components/Content/Content.tsx b/src/components/Content/Content.tsx
index 94fca32..19736fb 100644
--- a/src/components/Content/Content.tsx
+++ b/src/components/Content/Content.tsx
@@ -128,6 +128,21 @@ function ContentBody({ data, raw = false }: Omit<ContentProps, "setRaw">) {
128 ); 128 );
129 } 129 }
130 130
131 if (contentType?.startsWith("application/x-www-form-urlencoded")) {
132 return (
133 <ReactJson
134 src={Object.fromEntries(new URLSearchParams(atob(data.body)))}
135 theme={darkMode ? "monokai" : undefined}
136 style={{
137 padding: "1em",
138 width: "100%",
139 height: "100%",
140 overflowY: "auto",
141 }}
142 />
143 );
144 }
145
131 if (contentType?.startsWith("audio")) { 146 if (contentType?.startsWith("audio")) {
132 return <audio src={`data:${contentType};base64,${data.body}`} />; 147 return <audio src={`data:${contentType};base64,${data.body}`} />;
133 } 148 }