Skip to content

Commit a07fd9e

Browse files
authored
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.
1 parent ea9abfd commit a07fd9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/live-preview/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ The following arguments are provided to the `url` function:
112112
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:
113113

114114
```ts
115-
url: (doc, { req }) => `${req.protocol}//${req.host}/${doc.slug}` // highlight-line
115+
url: ({ data, req }) => `${req.protocol}//${req.host}/${data.slug}` // highlight-line
116116
```
117117

118118
### Breakpoints

0 commit comments

Comments
 (0)