import { useEffect } from 'react'; import { StoryFn, Meta } from '@storybook/react'; import { RecoilRoot, useSetRecoilState } from 'recoil'; import { AuthModal } from './AuthModal'; import { currentUserAtom } from '../../stores/ClientConfigStore'; import { CurrentUser } from '../../../interfaces/current-user'; const Example = () => { const setCurrentUser = useSetRecoilState(currentUserAtom); useEffect( () => setCurrentUser({ id: '1', displayName: 'Test User', displayColor: 3, isModerator: false, }), [], ); return (
); }; const meta = { title: 'owncast/Modals/Auth', component: AuthModal, parameters: {}, } satisfies Meta; export default meta; const Template: StoryFn = () => ( ); export const Basic = { render: Template, };