-
{props.author.name}
+ {/*
{participants[0]}
*/}
Указать предпочтительные языки для результатов поиска можно в разделе
diff --git a/src/components/Views/Inbox.tsx b/src/components/Views/Inbox.tsx
index ca076a1b..f339cc84 100644
--- a/src/components/Views/Inbox.tsx
+++ b/src/components/Views/Inbox.tsx
@@ -1,5 +1,5 @@
import { For, createSignal, Show, onMount, createEffect, createMemo } from 'solid-js'
-import type { Author } from '../../graphql/types.gen'
+import type { Author, Chat } from '../../graphql/types.gen'
import { AuthorCard } from '../Author/Card'
import { Icon } from '../_shared/Icon'
import { Loading } from '../Loading'
@@ -58,18 +58,10 @@ const postMessage = async (msg: string) => {
return response.data.createComment
}
-const handleGetChats = async () => {
- try {
- const response = await loadChats()
- console.log('!!! handleGetChats:', response)
- } catch (error) {
- console.log(error)
- }
-}
-
export const InboxView = () => {
const [messages, setMessages] = createSignal([])
const [recipients, setRecipients] = createSignal
([])
+ const [chats, setChats] = createSignal([])
const [cashedRecipients, setCashedRecipients] = createSignal([])
const [postMessageText, setPostMessageText] = createSignal('')
const [loading, setLoading] = createSignal(false)
@@ -116,6 +108,13 @@ export const InboxView = () => {
} catch (error) {
console.log(error)
}
+
+ try {
+ const response = await loadChats()
+ setChats(response as unknown as Chat[])
+ } catch (error) {
+ console.log(error)
+ }
})
const handleSubmit = async () => {
@@ -129,18 +128,19 @@ export const InboxView = () => {
}
}
- let formParent // autoresize ghost element
+ let textareaParent // textarea autoresize ghost element
const handleChangeMessage = (event) => {
setPostMessageText(event.target.value)
}
createEffect(() => {
- formParent.dataset.replicatedValue = postMessageText()
+ textareaParent.dataset.replicatedValue = postMessageText()
})
const handleOpenInviteModal = (event: Event) => {
event.preventDefault()
showModal('inviteToChat')
}
+
return (
@@ -160,14 +160,14 @@ export const InboxView = () => {
{t('All')}
- {t('Personal')}
+ {t('Personal')}
{t('Groups')}
-
- {(author) => }
+
+ {(chat) => }
@@ -198,7 +198,7 @@ export const InboxView = () => {