Refactor app state to be a state machine with access selectors

This commit is contained in:
Gabe Kangas
2022-05-25 20:38:40 -07:00
parent dde9878a46
commit 7b1667bf6a
21 changed files with 421 additions and 223 deletions

View File

@@ -2,7 +2,6 @@ import React from 'react';
import { ComponentStory, ComponentMeta } from '@storybook/react';
import { RecoilRoot } from 'recoil';
import { UserDropdown } from '../components/common';
import { ChatState } from '../interfaces/application-state';
export default {
title: 'owncast/Components/User settings menu',
@@ -22,11 +21,9 @@ const Template: ComponentStory<typeof UserDropdown> = args => <Example {...args}
export const ChatEnabled = Template.bind({});
ChatEnabled.args = {
username: 'test-user',
chatState: ChatState.Available,
};
export const ChatDisabled = Template.bind({});
ChatDisabled.args = {
username: 'test-user',
chatState: ChatState.NotAvailable,
};