everything-dev
Version:
A consolidated product package for building Module Federation apps with oRPC APIs.
47 lines (45 loc) • 1.8 kB
JavaScript
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
let react_jsx_runtime = require("react/jsx-runtime");
let _tanstack_react_query = require("@tanstack/react-query");
//#region src/ui/router-defaults.tsx
/**
* Shared router defaults — the fallback boundaries every core-ui router
* (client and SSR) renders with, and the QueryClient defaults both
* bootstraps agree on.
*/
function defaultNotFoundComponent() {
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
className: "min-h-screen flex items-center justify-center bg-background px-6",
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
className: "text-center",
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h1", {
className: "text-3xl font-semibold text-foreground",
children: "Not Found"
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
className: "mt-2 text-muted-foreground",
children: "The requested page could not be found."
})]
})
});
}
function defaultPendingComponent() {
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
className: "flex min-h-48 flex-1 items-center justify-center bg-background p-6",
role: "status",
"aria-live": "polite",
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "h-6 w-6 animate-spin rounded-full border-2 border-border border-t-foreground" })
});
}
function defaultQueryClient() {
return new _tanstack_react_query.QueryClient({ defaultOptions: { queries: {
staleTime: 3e5,
gcTime: 18e5,
refetchOnWindowFocus: false,
retry: 1
} } });
}
//#endregion
exports.defaultNotFoundComponent = defaultNotFoundComponent;
exports.defaultPendingComponent = defaultPendingComponent;
exports.defaultQueryClient = defaultQueryClient;
//# sourceMappingURL=router-defaults.cjs.map