Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

562 B
Raw Blame
import { type JSX, Suspense } from 'solid-js';

type DebugSuspenseProps = {
  name: string;
  children: JSX.Element;
  fallback?: JSX.Element;
};

function DebugSuspenseFallback(
  props: Pick<DebugSuspenseProps, 'name' | 'fallback'>
) {
  console.log(`suspense triggers ${props.name}`);
  return <>{props.fallback}</>;
}

export function DebugSuspense(props: DebugSuspenseProps) {
  return (
    <Suspense
      fallback={
        <DebugSuspenseFallback name={props.name} fallback={props.fallback} />
      }
    >
      {props.children}
    </Suspense>
  );
}