From f022b4947b9b1f667ccf002f64b764eb6a2d6fc1 Mon Sep 17 00:00:00 2001 From: Shai Reznik Date: Tue, 26 Nov 2024 17:59:35 +0200 Subject: [PATCH] fixed broken link to re-exporting loaders --- packages/docs/public/_redirects | 1 + packages/docs/src/routes/docs/cookbook/index.mdx | 2 +- packages/eslint-plugin-qwik/src/loaderLocation.ts | 2 +- packages/qwik-city/src/runtime/src/server-functions.ts | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/docs/public/_redirects b/packages/docs/public/_redirects index fe233b57ab4..a4965aab781 100644 --- a/packages/docs/public/_redirects +++ b/packages/docs/public/_redirects @@ -60,6 +60,7 @@ /docs/components/lifecycle/ /docs/components/tasks/ 308 /docs/components/projection/ /docs/components/slots/ 308 /docs/components/resource/ /docs/components/state/ 308 +/docs/cookbook/re-exporting-loaders/ /docs/re-exporting-loaders/ 308 /qwikcity/* /docs/:splat 308 /integrations/* /docs/integrations/:splat 308 diff --git a/packages/docs/src/routes/docs/cookbook/index.mdx b/packages/docs/src/routes/docs/cookbook/index.mdx index 72c7eb1ab8f..5af20d8aaa5 100644 --- a/packages/docs/src/routes/docs/cookbook/index.mdx +++ b/packages/docs/src/routes/docs/cookbook/index.mdx @@ -10,6 +10,7 @@ contributors: - Adbib - gioboa - aendel + - shairez --- # Cookbook @@ -27,7 +28,6 @@ Examples: - [Media Controller with iOS Support](./mediaController/) - [NavLink](./nav-link/) - [Portals](./portals/) -- [Re-exporting loaders](./re-exporting-loaders/) - [Streaming/deferred loaders](./streaming-deferred-loaders) - [Synchronous Events with State](./sync-events/) - [Theme Management](./theme-management/) diff --git a/packages/eslint-plugin-qwik/src/loaderLocation.ts b/packages/eslint-plugin-qwik/src/loaderLocation.ts index 4097291104f..095e3470213 100644 --- a/packages/eslint-plugin-qwik/src/loaderLocation.ts +++ b/packages/eslint-plugin-qwik/src/loaderLocation.ts @@ -40,7 +40,7 @@ export const loaderLocation: Rule.RuleModule = { (docs: https://qwik.dev/docs/route-loader/). This {{fnName}}() is declared outside of the route boundaries. This may be useful when you want to create reusable logic or a library. In such a case, it is essential that this function is re-exported from within the router boundary otherwise it will not run. -(docs: https://qwik.dev/docs/cookbook/re-exporting-loaders/). +(docs: https://qwik.dev/docs/re-exporting-loaders/). If you understand this, you can disable this warning with: // eslint-disable-next-line qwik/loader-location diff --git a/packages/qwik-city/src/runtime/src/server-functions.ts b/packages/qwik-city/src/runtime/src/server-functions.ts index 16b88226b81..fab407bee5c 100644 --- a/packages/qwik-city/src/runtime/src/server-functions.ts +++ b/packages/qwik-city/src/runtime/src/server-functions.ts @@ -197,7 +197,7 @@ export const routeLoaderQrl = (( For more information check: https://qwik.dev/qwikcity/route-loader/ If your are managing reusable logic or a library it is essential that this function is re-exported from within 'layout.tsx' or 'index.tsx file of the existing route otherwise it will not run or throw exception. - For more information check: https://qwik.dev/docs/cookbook/re-exporting-loaders/`); + For more information check: https://qwik.dev/docs/re-exporting-loaders/`); } return _wrapProp(state, id); });