mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-15 14:22:14 +00:00
Co-authored-by: Christopher Oliphant <christopheroliphant@christophersmbp.home>
18 lines
460 B
TypeScript
18 lines
460 B
TypeScript
export function parseQueueData(data: any, indent: number) {
|
|
if (data === undefined || data === null) {
|
|
return "None";
|
|
}
|
|
if (typeof data === "object") {
|
|
return (
|
|
<div className="relative">
|
|
{Object.entries(data).map(([key, value]) => (
|
|
<div key={key} style={{ paddingLeft: 8 * indent }}>
|
|
{key}: {parseQueueData(value, indent + 1)}
|
|
</div>
|
|
))}
|
|
</div>
|
|
);
|
|
}
|
|
return data.toString();
|
|
}
|