everything-dev
Version:
A consolidated product package for building Module Federation apps with oRPC APIs.
48 lines (46 loc) • 1.74 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: "min-h-screen flex items-center justify-center bg-background px-6",
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
className: "text-sm text-muted-foreground",
children: "Loading..."
})
});
}
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