🛂 (whatsapp) Remove feature flag

Closes #401
This commit is contained in:
Baptiste Arnaud
2023-09-29 15:10:39 +02:00
parent 1a4b8bb8fc
commit 0e4e10c77b
4 changed files with 18 additions and 30 deletions

View File

@@ -24,13 +24,4 @@ export const identifyUser = (userId: string) => {
posthog.identify(userId)
}
export const isWhatsAppAvailable = () => {
if (!env.NEXT_PUBLIC_POSTHOG_KEY || !posthog) return true
const isWhatsAppEnabled = posthog.getFeatureFlag('whatsApp', {
send_event: false,
})
if (isWhatsAppEnabled === undefined) return true
return posthog.__loaded && isWhatsAppEnabled
}
export { posthog }