diff --git a/frontend/src/scenes/persons-management/PersonsManagementScene.stories.tsx b/frontend/src/scenes/persons-management/PersonsManagementScene.stories.tsx new file mode 100644 index 0000000000000..98172922fa975 --- /dev/null +++ b/frontend/src/scenes/persons-management/PersonsManagementScene.stories.tsx @@ -0,0 +1,37 @@ +import { Meta, StoryFn } from '@storybook/react' +import { router } from 'kea-router' +import { useEffect } from 'react' +import { App } from 'scenes/App' +import { urls } from 'scenes/urls' + +const meta: Meta = { + title: 'Scenes-App/Persons & Groups', + parameters: { + layout: 'fullscreen', + viewMode: 'story', + mockDate: '2023-07-04', // To stabilize relative dates + }, + decorators: [], +} +export default meta + +export const Persons: StoryFn = () => { + useEffect(() => { + router.actions.push(urls.persons()) + }, []) + return +} + +export const Cohorts: StoryFn = () => { + useEffect(() => { + router.actions.push(urls.cohorts()) + }, []) + return +} + +export const Groups: StoryFn = () => { + useEffect(() => { + router.actions.push(urls.groups(0)) + }, []) + return +} diff --git a/frontend/src/scenes/persons-management/personsManagementSceneLogic.tsx b/frontend/src/scenes/persons-management/personsManagementSceneLogic.tsx index 7734a37566197..6434ba27d69e2 100644 --- a/frontend/src/scenes/persons-management/personsManagementSceneLogic.tsx +++ b/frontend/src/scenes/persons-management/personsManagementSceneLogic.tsx @@ -95,7 +95,7 @@ export const personsManagementSceneLogic = kea( ...(showGroupsIntroductionPage ? [ { - key: 'groups-intro', + key: 'groups-0', label: 'Groups', url: urls.groups(0), content: , @@ -137,6 +137,7 @@ export const personsManagementSceneLogic = kea( }), actionToUrl(({ values }) => ({ setTabKey: ({ tabKey }) => { + console.log(values.tabs, tabKey) return values.tabs.find((x) => x.key === tabKey)?.url || values.tabs[0].url }, })),