[WiP] messages render
This commit is contained in:
parent
737a77ae9a
commit
afef6d3639
|
@ -59,12 +59,11 @@ const CreateModalContent = (props: Props) => {
|
|||
|
||||
const { chatEntities, actions } = useInbox()
|
||||
|
||||
console.log('!!! chatEntities:', chatEntities)
|
||||
|
||||
const handleCreate = async () => {
|
||||
try {
|
||||
const initChat = await actions.createChat(slugs(), theme())
|
||||
console.debug('[initChat]', initChat)
|
||||
hideModal()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ type DialogProps = {
|
|||
online?: boolean
|
||||
message?: string
|
||||
counter?: number
|
||||
theme?: string
|
||||
title?: string
|
||||
ownSlug: string
|
||||
members: ChatMember[]
|
||||
}
|
||||
|
@ -19,9 +19,16 @@ const DialogCard = (props: DialogProps) => {
|
|||
console.log('!!! companions:', companions)
|
||||
return (
|
||||
<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}>
|
||||
{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>
|
||||
|
|
|
@ -168,7 +168,7 @@ export const InboxView = () => {
|
|||
<div class="holder">
|
||||
<div class="dialogs">
|
||||
<For each={chats()}>
|
||||
{(chat) => <DialogCard theme={chat.title} members={chat.members} ownSlug={currentSlug()} />}
|
||||
{(chat) => <DialogCard title={chat.title} members={chat.members} ownSlug={currentSlug()} />}
|
||||
</For>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user