everything-dev
Version:
A consolidated product package for building Module Federation apps with oRPC APIs.
45 lines (43 loc) • 1.41 kB
JavaScript
import { jsx, jsxs } from "react/jsx-runtime";
import { QueryClient } from "@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__ */ jsx("div", {
className: "min-h-screen flex items-center justify-center bg-background px-6",
children: /* @__PURE__ */ jsxs("div", {
className: "text-center",
children: [/* @__PURE__ */ jsx("h1", {
className: "text-3xl font-semibold text-foreground",
children: "Not Found"
}), /* @__PURE__ */ jsx("p", {
className: "mt-2 text-muted-foreground",
children: "The requested page could not be found."
})]
})
});
}
function defaultPendingComponent() {
return /* @__PURE__ */ jsx("div", {
className: "min-h-screen flex items-center justify-center bg-background px-6",
children: /* @__PURE__ */ jsx("p", {
className: "text-sm text-muted-foreground",
children: "Loading..."
})
});
}
function defaultQueryClient() {
return new QueryClient({ defaultOptions: { queries: {
staleTime: 3e5,
gcTime: 18e5,
refetchOnWindowFocus: false,
retry: 1
} } });
}
//#endregion
export { defaultNotFoundComponent, defaultPendingComponent, defaultQueryClient };
//# sourceMappingURL=router-defaults.mjs.map