Files
med-notes/.pnpm-store/v10/files/ce/57dd6bcca4f95d2f315380364d29775cdd4618984c67ad80a8e75eb3cd2eceed7f41e92c17f28b44035ed2985c4dd8f211bc90622aed1ee92909c8c77b18b3
2025-05-09 05:30:08 +02:00

23 lines
1.0 KiB
Plaintext

import { jsx } from "react/jsx-runtime";
import warning from "tiny-warning";
import { DefaultGlobalNotFound } from "./not-found.js";
function renderRouteNotFound(router, route, data) {
if (!route.options.notFoundComponent) {
if (router.options.defaultNotFoundComponent) {
return /* @__PURE__ */ jsx(router.options.defaultNotFoundComponent, { data });
}
if (process.env.NODE_ENV === "development") {
warning(
route.options.notFoundComponent,
`A notFoundError was encountered on the route with ID "${route.id}", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<div>Not Found<div>)`
);
}
return /* @__PURE__ */ jsx(DefaultGlobalNotFound, {});
}
return /* @__PURE__ */ jsx(route.options.notFoundComponent, { data });
}
export {
renderRouteNotFound
};
//# sourceMappingURL=renderRouteNotFound.js.map