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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user