Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 681 Bytes
5916048 5be784e 5916048 91c3567 5916048 5be784e 91c3567 5be784e 5916048 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import Highlight from "react-highlight";
import { Loading } from "@/components/loading";
export const Response = ({ res, loading }: { res: any; loading: boolean }) => {
return (
<div className="overflow-auto h-full relative xl:col-span-2 border-l border-slate-200 dark:border-slate-700/50">
<Highlight className="json text-sm !bg-slate-100 dark:!bg-slate-950/10 !h-full !p-3 !font-code !whitespace-pre-wrap">
{JSON.stringify(res ?? {}, null, 2)}
</Highlight>
{loading && (
<Loading>
<p className="text-white dark:text-slate-400 text-lg mt-4">
Processing...
</p>
</Loading>
)}
</div>
);
};
|