📈(frontend) check if analytic is enabled
Few frontend features rely on Posthog. Posthog is not activated in dev environment. Offer a hook that encapsulates this logic, and return a boolean flag.
This commit is contained in:
committed by
aleb_the_flash
parent
7ce4390740
commit
3902b02691
@@ -0,0 +1,6 @@
|
||||
import { useConfig } from '@/api/useConfig.ts'
|
||||
|
||||
export const useIsAnalyticsEnabled = () => {
|
||||
const { data } = useConfig()
|
||||
return !!data?.analytics?.id
|
||||
}
|
||||
Reference in New Issue
Block a user