🐛 Fix delete session with client side actions
This commit is contained in:
@@ -24,11 +24,13 @@ export const identifyUser = (userId: string) => {
|
||||
posthog.identify(userId)
|
||||
}
|
||||
|
||||
export const getFeatureFlags = () => {
|
||||
return posthog.__loaded &&
|
||||
posthog.isFeatureEnabled('whatsApp', { send_event: false })
|
||||
? ['whatsApp']
|
||||
: []
|
||||
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 }
|
||||
|
||||
Reference in New Issue
Block a user