Added module Links
This commit is contained in:
+6
-2
@@ -69,11 +69,15 @@ przekazywania siteKey do każdego formularza.
|
||||
|
||||
```tsx
|
||||
// app/(frontend)/[locale]/layout.tsx (server)
|
||||
import { getSiteIntegrations } from '@intecion/ipal-kit'
|
||||
import { TurnstileProvider } from '@intecion/ipal-kit/client'
|
||||
import { getTurnstileSiteKey } from '@/lib/payload' // Twój helper server-side
|
||||
import { getCachedPayload } from '@/lib/content'
|
||||
|
||||
export default async function Layout({ children }) {
|
||||
const siteKey = await getTurnstileSiteKey() // z panelu (SiteIntegrations)
|
||||
// tylko publiczny siteKey — sekret Turnstile nigdy nie trafia do klienta
|
||||
const { turnstileSiteKey: siteKey } = await getSiteIntegrations<{ turnstileSiteKey?: string }>(
|
||||
await getCachedPayload(),
|
||||
)
|
||||
return (
|
||||
<html>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user