// TopBar — brand + workspace + per-platform credit balances + user. const { useState } = React; window.TopBar = function TopBar({ onOpenTweaks, credits }) { const c = credits || {}; // Only surface platforms whose balance is known. Backend-less platforms // stay out of the bar until their credit feed lands. const chips = Object.entries(PLATFORMS) .map(([key, p]) => [key, p, c[key]]) .filter(([, , bal]) => typeof bal === "number"); return (
Resilia
⌘K
{chips.length > 0 && (
{chips.map(([key, p, bal]) => ( {p.label} {bal.toLocaleString()} ))}
)}
KN
); };