docs: fixes dynamic, fully qualified live preview url args (#10985)

The snippet for generating a dynamic, fully qualified live preview url
was wrong. It was indicating there were two arguments passed to that
function, when in fact there is only one.
This commit is contained in:
Jacob Fletcher
2025-02-04 16:57:16 -05:00
committed by GitHub
parent ea9abfdef3
commit a07fd9eba3

View File

@@ -112,7 +112,7 @@ The following arguments are provided to the `url` function:
If your application requires a fully qualified URL, such as within deploying to Vercel Preview Deployments, you can use the `req` property to build this URL: If your application requires a fully qualified URL, such as within deploying to Vercel Preview Deployments, you can use the `req` property to build this URL:
```ts ```ts
url: (doc, { req }) => `${req.protocol}//${req.host}/${doc.slug}` // highlight-line url: ({ data, req }) => `${req.protocol}//${req.host}/${data.slug}` // highlight-line
``` ```
### Breakpoints ### Breakpoints