mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-17 23:14:03 +01:00
Clean up model fetching and loading states
This commit is contained in:
@@ -19,10 +19,11 @@ export function HTMLOrTextViewer({ response, pretty, textViewerClassName }: Prop
|
||||
rawTextBody.data ?? '',
|
||||
);
|
||||
|
||||
if (rawTextBody.isLoading) {
|
||||
if (rawTextBody.isLoading || response.state === 'initialized') {
|
||||
return null;
|
||||
}
|
||||
|
||||
console.log("HELLO", rawTextBody.data, response);
|
||||
// Wasn't able to decode as text, so it must be binary
|
||||
if (rawTextBody.data == null) {
|
||||
return <BinaryViewer response={response} />;
|
||||
|
||||
Reference in New Issue
Block a user