From eec450276d5df6694bee25a27b797cfcfa235a9f Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Thu, 12 Dec 2024 17:59:47 +0200 Subject: [PATCH] docs: improve examples in module link direction (#10590) --- .../learn/fundamentals/module-links/directions/page.mdx | 8 ++++---- www/apps/book/generated/edit-dates.mjs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/www/apps/book/app/learn/fundamentals/module-links/directions/page.mdx b/www/apps/book/app/learn/fundamentals/module-links/directions/page.mdx index b6ba91df6c..589c0024ba 100644 --- a/www/apps/book/app/learn/fundamentals/module-links/directions/page.mdx +++ b/www/apps/book/app/learn/fundamentals/module-links/directions/page.mdx @@ -38,12 +38,12 @@ The above links are two different links that serve different purposes. If you're adding a link to a data model to extend it and add new fields, define the link from the main data model to the custom data model. -For example, if the `myCustom` data model adds new fields to the `product` data model, define the link from `product` to `myCustom`: +For example, consider you want to add a `subtitle` custom field to the `product` data model. To do that, you define a `Subtitle` data model in your module, then define a link from the `Product` data model to it: ```ts export default defineLink( ProductModule.linkable.product, - HelloModule.linkable.myCustom + HelloModule.linkable.subtitle ) ``` @@ -51,11 +51,11 @@ export default defineLink( If you're linking data models to indicate an association between them, define the link from the custom data model to the main data model. -For example, if the `myCustom` data model is associated to the `product` data model, define the link from `myCustom` to `product`: +For example, consider you have `Post` data model representing a blog post, and you want to associate a blog post with a product. To do that, define a link from the `Post` data model to `Product`: ```ts export default defineLink( - HelloModule.linkable.myCustom, + HelloModule.linkable.post, ProductModule.linkable.product ) ``` diff --git a/www/apps/book/generated/edit-dates.mjs b/www/apps/book/generated/edit-dates.mjs index 4cc507ffbc..f4f667a7e7 100644 --- a/www/apps/book/generated/edit-dates.mjs +++ b/www/apps/book/generated/edit-dates.mjs @@ -73,7 +73,7 @@ export const generatedEditDates = { "app/learn/debugging-and-testing/testing-tools/modules-tests/module-example/page.mdx": "2024-12-09T15:52:22.185Z", "app/learn/debugging-and-testing/testing-tools/modules-tests/page.mdx": "2024-12-09T15:52:57.091Z", "app/learn/fundamentals/module-links/custom-columns/page.mdx": "2024-11-20T14:32:09.764Z", - "app/learn/fundamentals/module-links/directions/page.mdx": "2024-10-21T13:30:21.369Z", + "app/learn/fundamentals/module-links/directions/page.mdx": "2024-12-12T15:31:31.555Z", "app/learn/fundamentals/module-links/page.mdx": "2024-12-09T14:39:26.668Z", "app/learn/fundamentals/module-links/query/page.mdx": "2024-12-09T15:54:44.798Z", "app/learn/fundamentals/module-links/remote-link/page.mdx": "2024-10-28T04:22:21.328Z",