alinea
Version:
[](https://npmjs.org/package/alinea) [](https://packagephobia.com/result?p=alinea)
24 lines (22 loc) • 569 B
JavaScript
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
};