import { memo } from 'react'
import { IS_CE_EDITION, IS_PROD, ZENDESK_WIDGET_KEY } from '@/config'
import { headers } from '@/next/headers'
import Script from '@/next/script'
const Zendesk = async () => {
if (IS_CE_EDITION || !ZENDESK_WIDGET_KEY)
return null
const nonce = IS_PROD ? (await headers()).get('x-nonce') ?? '' : ''
/* v8 ignore next -- `nonce` is always a string (`''` or header value), so nullish fallback is unreachable in runtime. @preserve */
const scriptNonce = nonce ?? undefined
return (
<>
>
)
}
export default memo(Zendesk)