[WiP] messages render
This commit is contained in:
parent
737a77ae9a
commit
afef6d3639
|
@ -59,12 +59,11 @@ const CreateModalContent = (props: Props) => {
|
||||||
|
|
||||||
const { chatEntities, actions } = useInbox()
|
const { chatEntities, actions } = useInbox()
|
||||||
|
|
||||||
console.log('!!! chatEntities:', chatEntities)
|
|
||||||
|
|
||||||
const handleCreate = async () => {
|
const handleCreate = async () => {
|
||||||
try {
|
try {
|
||||||
const initChat = await actions.createChat(slugs(), theme())
|
const initChat = await actions.createChat(slugs(), theme())
|
||||||
console.debug('[initChat]', initChat)
|
console.debug('[initChat]', initChat)
|
||||||
|
hideModal()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ type DialogProps = {
|
||||||
online?: boolean
|
online?: boolean
|
||||||
message?: string
|
message?: string
|
||||||
counter?: number
|
counter?: number
|
||||||
theme?: string
|
title?: string
|
||||||
ownSlug: string
|
ownSlug: string
|
||||||
members: ChatMember[]
|
members: ChatMember[]
|
||||||
}
|
}
|
||||||
|
@ -19,9 +19,16 @@ const DialogCard = (props: DialogProps) => {
|
||||||
console.log('!!! companions:', companions)
|
console.log('!!! companions:', companions)
|
||||||
return (
|
return (
|
||||||
<div class={styles.DialogCard}>
|
<div class={styles.DialogCard}>
|
||||||
<div class={styles.avatar}>{/*<DialogAvatar name={participants[0]} online={props.online} />*/}</div>
|
<div class={styles.avatar}>
|
||||||
|
<DialogAvatar name={props.members[0].name} url={props.members[0].userpic} />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class={styles.row}>
|
<div class={styles.row}>
|
||||||
{companions.length > 1 ? <div>Group</div> : <div class={styles.name}>{companions[0].name}</div>}
|
{companions.length > 1 ? (
|
||||||
|
<div class={styles.name}>{props.title}</div>
|
||||||
|
) : (
|
||||||
|
<div class={styles.name}>{companions[0].name}</div>
|
||||||
|
)}
|
||||||
<div class={styles.message}>
|
<div class={styles.message}>
|
||||||
Указать предпочтительные языки для результатов поиска можно в разделе
|
Указать предпочтительные языки для результатов поиска можно в разделе
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -168,7 +168,7 @@ export const InboxView = () => {
|
||||||
<div class="holder">
|
<div class="holder">
|
||||||
<div class="dialogs">
|
<div class="dialogs">
|
||||||
<For each={chats()}>
|
<For each={chats()}>
|
||||||
{(chat) => <DialogCard theme={chat.title} members={chat.members} ownSlug={currentSlug()} />}
|
{(chat) => <DialogCard title={chat.title} members={chat.members} ownSlug={currentSlug()} />}
|
||||||
</For>
|
</For>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user