Skip to content

Commit

Permalink
Fixes groups and add storiees
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite committed Nov 23, 2023
1 parent 3cb9ed4 commit b716da5
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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 <App />
}

export const Cohorts: StoryFn = () => {
useEffect(() => {
router.actions.push(urls.cohorts())
}, [])
return <App />
}

export const Groups: StoryFn = () => {
useEffect(() => {
router.actions.push(urls.groups(0))
}, [])
return <App />
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const personsManagementSceneLogic = kea<personsManagementSceneLogicType>(
...(showGroupsIntroductionPage
? [
{
key: 'groups-intro',
key: 'groups-0',
label: 'Groups',
url: urls.groups(0),
content: <Groups groupTypeIndex={0} />,
Expand Down Expand Up @@ -137,6 +137,7 @@ export const personsManagementSceneLogic = kea<personsManagementSceneLogicType>(
}),
actionToUrl(({ values }) => ({
setTabKey: ({ tabKey }) => {
console.log(values.tabs, tabKey)

Check failure on line 140 in frontend/src/scenes/persons-management/personsManagementSceneLogic.tsx

View workflow job for this annotation

GitHub Actions / Code quality checks

Unexpected console statement
return values.tabs.find((x) => x.key === tabKey)?.url || values.tabs[0].url
},
})),
Expand Down

0 comments on commit b716da5

Please sign in to comment.