Dev only debug hook
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
|||||||
usePreferencesQuery,
|
usePreferencesQuery,
|
||||||
} from '#/state/queries/preferences'
|
} from '#/state/queries/preferences'
|
||||||
import {useAgent} from '#/state/session'
|
import {useAgent} from '#/state/session'
|
||||||
|
import * as env from '#/env'
|
||||||
import {
|
import {
|
||||||
type LiveEventFeed,
|
type LiveEventFeed,
|
||||||
type LiveEventFeedMetricContext,
|
type LiveEventFeedMetricContext,
|
||||||
@@ -40,7 +41,7 @@ function useWebOnlyDebugLiveEventPreferences() {
|
|||||||
const agent = useAgent()
|
const agent = useAgent()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isWeb && typeof window !== 'undefined') {
|
if (env.IS_DEV && isWeb && typeof window !== 'undefined') {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
window.__updateLiveEventPreferences = async (
|
window.__updateLiveEventPreferences = async (
|
||||||
action: LiveEventPreferencesAction,
|
action: LiveEventPreferencesAction,
|
||||||
|
|||||||
Reference in New Issue
Block a user