Skip to content

Commit 72954ce

Browse files
authored
docs: fixes typo in ternary operator for live preview docs (#13163)
Fixes ternary operator in live preview docs.
1 parent e502203 commit 72954ce

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

docs/live-preview/overview.mdx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,16 @@ const config = buildConfig({
8888
// ...
8989
livePreview: {
9090
// highlight-start
91-
url: ({
92-
data,
93-
collectionConfig,
94-
locale
95-
}) => `${data.tenant.url}${ // Multi-tenant top-level domain
96-
collectionConfig.slug === 'posts' ? `/posts/${data.slug}` : `${data.slug !== 'home' : `/${data.slug}` : ''}`
97-
}${locale ? `?locale=${locale?.code}` : ''}`, // Localization query param
91+
url: ({ data, collectionConfig, locale }) =>
92+
`${data.tenant.url}${
93+
collectionConfig.slug === 'posts'
94+
? `/posts/${data.slug}`
95+
: `${data.slug !== 'home' ? `/${data.slug}` : ''}`
96+
}${locale ? `?locale=${locale?.code}` : ''}`, // Localization query param
9897
collections: ['pages'],
9998
},
10099
// highlight-end
101-
}
100+
},
102101
})
103102
```
104103

0 commit comments

Comments
 (0)