Fix more build errors

This commit is contained in:
Gabe Kangas 2022-07-10 17:41:20 -07:00
parent fc40953bcc
commit 24db1d6c6d
No known key found for this signature in database
GPG key ID: 9A56337728BC81EA

View file

@ -1,5 +1,6 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { ComponentStory, ComponentMeta } from '@storybook/react'; import { ComponentStory, ComponentMeta } from '@storybook/react';
import { RecoilRoot } from 'recoil';
import ChatContainer from '../components/chat/ChatContainer'; import ChatContainer from '../components/chat/ChatContainer';
import { ChatMessage } from '../interfaces/chat-message.model'; import { ChatMessage } from '../interfaces/chat-message.model';
@ -28,7 +29,7 @@ const AddMessagesChatExample = args => {
const [chatMessages, setChatMessages] = useState<ChatMessage[]>(m); const [chatMessages, setChatMessages] = useState<ChatMessage[]>(m);
return ( return (
<div> <RecoilRoot>
<button type="button" onClick={() => setChatMessages([...chatMessages, chatMessages[0]])}> <button type="button" onClick={() => setChatMessages([...chatMessages, chatMessages[0]])}>
Add message Add message
</button> </button>
@ -39,7 +40,7 @@ const AddMessagesChatExample = args => {
isModerator={false} isModerator={false}
isMobile={false} isMobile={false}
/> />
</div> </RecoilRoot>
); );
}; };
@ -56,8 +57,3 @@ SingleMessage.args = {
loading: false, loading: false,
messages: [messages[0]], messages: [messages[0]],
}; };
export const Loading = Template.bind({});
Loading.args = {
loading: true,
};