@the-portland-company/shell 0.75.1 → 0.76.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/native.cjs CHANGED
@@ -502,12 +502,16 @@ function useNavChrome(component) {
502
502
  }
503
503
  return ctx;
504
504
  }
505
- function useChromeOrgs() {
505
+ function useChromeOrgs({ enabled = true } = {}) {
506
506
  const { dedupedFetch } = useNavChrome("useChromeOrgs");
507
507
  const [orgs, setOrgs] = react.useState(null);
508
- const [loading, setLoading] = react.useState(true);
508
+ const [loading, setLoading] = react.useState(enabled);
509
509
  const [error, setError] = react.useState(false);
510
510
  react.useEffect(() => {
511
+ if (!enabled) {
512
+ setLoading(false);
513
+ return;
514
+ }
511
515
  let cancelled = false;
512
516
  setLoading(true);
513
517
  setError(false);
@@ -523,7 +527,7 @@ function useChromeOrgs() {
523
527
  return () => {
524
528
  cancelled = true;
525
529
  };
526
- }, [dedupedFetch]);
530
+ }, [dedupedFetch, enabled]);
527
531
  return { orgs, loading, error };
528
532
  }
529
533
  function ValueSkeleton({ className }) {
@@ -1287,10 +1291,14 @@ function composeSupportMessage(input) {
1287
1291
  ---
1288
1292
  ${ctx.join("\n")}`;
1289
1293
  }
1290
- function SupportAction({ orgId } = {}) {
1294
+ function SupportAction({
1295
+ orgId,
1296
+ orgs: knownOrgs
1297
+ } = {}) {
1291
1298
  const { fetchJson } = useNavChrome("SupportAction");
1292
1299
  const { me, loaded } = useChromeMe();
1293
- const { orgs } = useChromeOrgs();
1300
+ const { orgs: fetchedOrgs } = useChromeOrgs({ enabled: !knownOrgs });
1301
+ const orgs = knownOrgs ?? fetchedOrgs;
1294
1302
  const [open, setOpen] = react.useState(false);
1295
1303
  const [message, setMessage] = react.useState("");
1296
1304
  const [email, setEmail] = react.useState("");
@@ -2893,7 +2901,7 @@ function NavSidebar({
2893
2901
  "div",
2894
2902
  {
2895
2903
  "data-shell-meta": true,
2896
- className: `mt-1.5 flex flex-col items-center gap-0.5 font-[family-name:var(--font-mono,ui-monospace,monospace)] text-[11px] text-[color:var(--sidebar-meta-text,rgba(255,255,255,0.4))] ${rc("max-md:hidden")}`,
2904
+ className: `mt-1.5 flex flex-col items-center gap-0.5 font-[family-name:var(--font-mono,ui-monospace,monospace)] text-[11px] text-[color:var(--sidebar-meta-text,rgba(255,255,255,0.72))] ${rc("max-md:hidden")}`,
2897
2905
  children: [
2898
2906
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5", children: [
2899
2907
  footer.envLabel ? shortEnvLabel(footer.envLabel) : null,