everything-dev
Version:
A consolidated product package for building Module Federation apps with oRPC APIs.
1 lines • 1.7 kB
Source Map (JSON)
{"version":3,"file":"router-defaults.mjs","names":[],"sources":["../../src/ui/router-defaults.tsx"],"sourcesContent":["/**\n * Shared router defaults — the fallback boundaries every core-ui router\n * (client and SSR) renders with, and the QueryClient defaults both\n * bootstraps agree on.\n */\n\nimport { QueryClient } from \"@tanstack/react-query\";\n\nexport function defaultNotFoundComponent() {\n return (\n <div className=\"min-h-screen flex items-center justify-center bg-background px-6\">\n <div className=\"text-center\">\n <h1 className=\"text-3xl font-semibold text-foreground\">Not Found</h1>\n <p className=\"mt-2 text-muted-foreground\">The requested page could not be found.</p>\n </div>\n </div>\n );\n}\n\nexport function defaultPendingComponent() {\n return (\n <div className=\"min-h-screen flex items-center justify-center bg-background px-6\">\n <p className=\"text-sm text-muted-foreground\">Loading...</p>\n </div>\n );\n}\n\nexport function defaultQueryClient(): QueryClient {\n return new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: 5 * 60 * 1000,\n gcTime: 30 * 60 * 1000,\n refetchOnWindowFocus: false,\n retry: 1,\n },\n },\n });\n}\n"],"mappings":";;;;;;;;;AAQA,SAAgB,2BAA2B;CACzC,OACE,oBAAC,OAAD;EAAK,WAAU;YACb,qBAAC,OAAD;GAAK,WAAU;aAAf,CACE,oBAAC,MAAD;IAAI,WAAU;cAAyC;GAAa,IACpE,oBAAC,KAAD;IAAG,WAAU;cAA6B;GAAyC,EAChF;;CACF;AAET;AAEA,SAAgB,0BAA0B;CACxC,OACE,oBAAC,OAAD;EAAK,WAAU;YACb,oBAAC,KAAD;GAAG,WAAU;aAAgC;EAAa;CACvD;AAET;AAEA,SAAgB,qBAAkC;CAChD,OAAO,IAAI,YAAY,EACrB,gBAAgB,EACd,SAAS;EACP,WAAW;EACX,QAAQ;EACR,sBAAsB;EACtB,OAAO;CACT,EACF,EACF,CAAC;AACH"}