2022-03-16 09:14:16 +01:00
|
|
|
import { AppContext } from '~/types'
|
2022-03-21 13:45:10 +01:00
|
|
|
import { MOCK_DEFAULT_TEAM } from 'lib/api.mock'
|
2022-03-16 09:14:16 +01:00
|
|
|
|
2022-03-21 13:45:10 +01:00
|
|
|
export const getStorybookAppContext = (): AppContext => ({
|
|
|
|
anonymous: false,
|
|
|
|
current_team: MOCK_DEFAULT_TEAM,
|
|
|
|
current_user: undefined as any, // undefined triggers a fetch and lets us mock the data
|
2022-03-16 09:14:16 +01:00
|
|
|
default_event_name: '$pageview',
|
|
|
|
persisted_feature_flags: [],
|
2022-03-21 13:45:10 +01:00
|
|
|
preflight: null as any, // null triggers a fetch and lets us mock the data
|
|
|
|
switched_team: null,
|
|
|
|
})
|