docs: fixes typo in ternary operator for live preview docs (#13163)
Fixes ternary operator in live preview docs.
This commit is contained in:
@@ -88,17 +88,16 @@ const config = buildConfig({
|
|||||||
// ...
|
// ...
|
||||||
livePreview: {
|
livePreview: {
|
||||||
// highlight-start
|
// highlight-start
|
||||||
url: ({
|
url: ({ data, collectionConfig, locale }) =>
|
||||||
data,
|
`${data.tenant.url}${
|
||||||
collectionConfig,
|
collectionConfig.slug === 'posts'
|
||||||
locale
|
? `/posts/${data.slug}`
|
||||||
}) => `${data.tenant.url}${ // Multi-tenant top-level domain
|
: `${data.slug !== 'home' ? `/${data.slug}` : ''}`
|
||||||
collectionConfig.slug === 'posts' ? `/posts/${data.slug}` : `${data.slug !== 'home' : `/${data.slug}` : ''}`
|
|
||||||
}${locale ? `?locale=${locale?.code}` : ''}`, // Localization query param
|
}${locale ? `?locale=${locale?.code}` : ''}`, // Localization query param
|
||||||
collections: ['pages'],
|
collections: ['pages'],
|
||||||
},
|
},
|
||||||
// highlight-end
|
// highlight-end
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user