mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-21 08:11:24 +02:00
Fix flash loading response viewer
This commit is contained in:
@@ -9,12 +9,15 @@ interface Props {
|
||||
}
|
||||
|
||||
export function JsonViewer({ response, className }: Props) {
|
||||
const rawBody = useResponseBodyText(response) ?? '';
|
||||
const rawBody = useResponseBodyText(response);
|
||||
|
||||
if (rawBody.isLoading || rawBody.data == null) return null;
|
||||
|
||||
let parsed = {};
|
||||
try {
|
||||
parsed = JSON.parse(rawBody);
|
||||
parsed = JSON.parse(rawBody.data);
|
||||
} catch (e) {
|
||||
// foo
|
||||
// Nothing yet
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user