UNPKG

alinea

Version:

[![npm](https://img.shields.io/npm/v/alinea.svg)](https://npmjs.org/package/alinea) [![install size](https://packagephobia.com/badge?p=alinea)](https://packagephobia.com/result?p=alinea)

24 lines (22 loc) 569 B
import "../../chunks/chunk-U5RRZUYZ.js"; // src/dashboard/util/SuspenseBoundary.tsx import { Suspense, useEffect } from "react"; import { jsx } from "react/jsx-runtime"; function LogMsg({ name, children }) { useEffect(() => { console.log(`SuspenseBoundary ${name} fallback triggered`); }, []); return children; } function SuspenseBoundary(props) { return /* @__PURE__ */ jsx( Suspense, { ...props, fallback: /* @__PURE__ */ jsx(LogMsg, { name: props.name, children: props.fallback ?? null }) } ); } export { SuspenseBoundary };