mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-22 08:40:03 +01:00
715056ab69
* thrown an explicit error if can't render react app (shown on the toolbar authorize scene) * remove reverse logic connection * upgrade kea, remove deprecated code * don't permanently auto-connect this logic * add few direct connections * remove automatic mount * fix few extra setState calls * improve howto create stories * refactor new dashboard form * use new form component for flags * new flag story * refactor scene stories to use <App /> * add even more default mocks * fix two bugs * fix more test issues * increase the quality of mocked data * fix new dashboard redirect logic, simplify code even further * fix test * update docs
13 lines
474 B
TypeScript
13 lines
474 B
TypeScript
import { AppContext } from '~/types'
|
|
import { MOCK_DEFAULT_TEAM } from 'lib/api.mock'
|
|
|
|
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
|
|
default_event_name: '$pageview',
|
|
persisted_feature_flags: [],
|
|
preflight: null as any, // null triggers a fetch and lets us mock the data
|
|
switched_team: null,
|
|
})
|