Add back local web debug, useful
This commit is contained in:
@@ -12,10 +12,12 @@ import {IS_TEST_USER} from '#/lib/constants'
|
|||||||
import {logEvent, LogEvents} from '#/lib/statsig/statsig'
|
import {logEvent, LogEvents} from '#/lib/statsig/statsig'
|
||||||
import {hasProp} from '#/lib/type-guards'
|
import {hasProp} from '#/lib/type-guards'
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
|
import {isWeb} from '#/platform/detection'
|
||||||
import * as persisted from '#/state/persisted'
|
import * as persisted from '#/state/persisted'
|
||||||
import {PUBLIC_BSKY_AGENT} from '#/state/queries'
|
import {PUBLIC_BSKY_AGENT} from '#/state/queries'
|
||||||
import {useLoggedOutViewControls} from '#/state/shell/logged-out'
|
import {useLoggedOutViewControls} from '#/state/shell/logged-out'
|
||||||
import {useCloseAllActiveElements} from '#/state/util'
|
import {useCloseAllActiveElements} from '#/state/util'
|
||||||
|
import {IS_DEV} from '#/env'
|
||||||
import {emitSessionDropped} from '../events'
|
import {emitSessionDropped} from '../events'
|
||||||
import {readLabelers} from './agent-config'
|
import {readLabelers} from './agent-config'
|
||||||
|
|
||||||
@@ -588,6 +590,11 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
|||||||
// as we migrate, continue to keep this updated
|
// as we migrate, continue to keep this updated
|
||||||
__globalAgent = agent
|
__globalAgent = agent
|
||||||
|
|
||||||
|
if (IS_DEV && isWeb) {
|
||||||
|
// @ts-ignore
|
||||||
|
window.agent = agent
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StateContext.Provider value={stateContext}>
|
<StateContext.Provider value={stateContext}>
|
||||||
<ApiContext.Provider value={api}>{children}</ApiContext.Provider>
|
<ApiContext.Provider value={api}>{children}</ApiContext.Provider>
|
||||||
|
|||||||
Reference in New Issue
Block a user