Builds the markers, data block and stand-in host for the CMS host injection
The pages carry the CMS markers (data block, list regions, JSON-LD price, inline price); PackagesProvider reads the host's data block after hydration and asks the API only when there is none; the site address comes from the block. A stand-in for the host (config/hostInjector.ts, --cms-data in the preview server) and browser tests check the behaviour with different data. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -56,7 +56,16 @@ export default function PackageBlock({
|
||||
color="accent.deep"
|
||||
mt={4}
|
||||
>
|
||||
{pkg ? formatPrice(pkg.price) : onRequest.price}
|
||||
{pkg ? (
|
||||
// CMS data: the host rewrites the text of this span in the
|
||||
// HTML it sends, so a different text is not a hydration
|
||||
// error
|
||||
<span data-cms-price={pkg.id} suppressHydrationWarning>
|
||||
{formatPrice(pkg.price)}
|
||||
</span>
|
||||
) : (
|
||||
onRequest.price
|
||||
)}
|
||||
</Text>
|
||||
{pkg ? (
|
||||
<Box as="ul" role="list" listStyle="none" m={0} p={0} mt={5}>
|
||||
|
||||
Reference in New Issue
Block a user