fixtype
This commit is contained in:
parent
333d7c5961
commit
2c2ed95053
|
@ -21,6 +21,8 @@ const CreateModalContent = (props: Props) => {
|
||||||
const [chatTitle, setChatTitle] = createSignal<string>('')
|
const [chatTitle, setChatTitle] = createSignal<string>('')
|
||||||
const [usersId, setUsersId] = createSignal<number[]>([])
|
const [usersId, setUsersId] = createSignal<number[]>([])
|
||||||
const [collectionToInvite, setCollectionToInvite] = createSignal<inviteUser[]>(inviteUsers)
|
const [collectionToInvite, setCollectionToInvite] = createSignal<inviteUser[]>(inviteUsers)
|
||||||
|
const { createChat, loadChats } = useInbox()
|
||||||
|
|
||||||
let textInput: HTMLInputElement
|
let textInput: HTMLInputElement
|
||||||
|
|
||||||
const reset = () => {
|
const reset = () => {
|
||||||
|
@ -54,14 +56,12 @@ const CreateModalContent = (props: Props) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const { actions } = useInbox()
|
|
||||||
|
|
||||||
const handleCreate = async () => {
|
const handleCreate = async () => {
|
||||||
try {
|
try {
|
||||||
const initChat = await actions.createChat(usersId(), chatTitle())
|
const initChat = await createChat(usersId(), chatTitle())
|
||||||
console.debug('[components.Inbox] create chat result:', initChat)
|
console.debug('[components.Inbox] create chat result:', initChat)
|
||||||
hideModal()
|
hideModal()
|
||||||
await actions.loadChats()
|
await loadChats()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user