import React, { useEffect } from 'react'; import { ComponentStory, ComponentMeta } from '@storybook/react'; import { RecoilRoot, useSetRecoilState } from 'recoil'; import { NameChangeModal } from './NameChangeModal'; import { CurrentUser } from '../../../interfaces/current-user'; import { currentUserAtom } from '../../stores/ClientConfigStore'; export default { title: 'owncast/Modals/Name Change', component: NameChangeModal, parameters: {}, } as ComponentMeta; const Example = () => { const setCurrentUser = useSetRecoilState(currentUserAtom); useEffect( () => setCurrentUser({ id: '1', displayName: 'Test User', displayColor: 3, isModerator: false, }), [], ); return (
{}} />
); }; const Template: ComponentStory = () => ( ); export const Basic = Template.bind({});