fix type: setChatSthore is async
This commit is contained in:
@@ -205,9 +205,9 @@ const LongInput = (props: {
|
|||||||
<Textarea
|
<Textarea
|
||||||
className="h-24 w-full"
|
className="h-24 w-full"
|
||||||
value={chatStore[props.field]}
|
value={chatStore[props.field]}
|
||||||
onChange={(event: any) => {
|
onChange={async (event: any) => {
|
||||||
chatStore[props.field] = event.target.value;
|
chatStore[props.field] = event.target.value;
|
||||||
setChatStore({ ...chatStore });
|
await setChatStore({ ...chatStore });
|
||||||
autoHeight(event.target);
|
autoHeight(event.target);
|
||||||
}}
|
}}
|
||||||
onKeyPress={(event: any) => {
|
onKeyPress={(event: any) => {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ interface AppContextType {
|
|||||||
|
|
||||||
interface AppChatStoreContextType {
|
interface AppChatStoreContextType {
|
||||||
chatStore: ChatStore;
|
chatStore: ChatStore;
|
||||||
setChatStore: (cs: ChatStore) => void;
|
setChatStore: (cs: ChatStore) => Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const AppContext = createContext<AppContextType>(null as any);
|
export const AppContext = createContext<AppContextType>(null as any);
|
||||||
|
|||||||
Reference in New Issue
Block a user