fixl
This commit is contained in:
parent
c1729ba18b
commit
8256ed2c87
|
@ -13,18 +13,16 @@ type DialogProps = {
|
|||
}
|
||||
|
||||
const DialogCard = (props: DialogProps) => {
|
||||
const { session } = useSession()
|
||||
const participants = props.members?.filter((m) => m?.id !== session().user.id) || []
|
||||
console.log('!!! participants:', participants)
|
||||
console.log('!!! participants:', props.members)
|
||||
return (
|
||||
//DialogCardView - подумать
|
||||
<Show when={participants?.length > 0}>
|
||||
<Show when={props.members?.length > 0}>
|
||||
<div class={styles.DialogCard}>
|
||||
<div class={styles.avatar}>
|
||||
<DialogAvatar name={participants[0].name} online={props.online} />
|
||||
<DialogAvatar name={props.members[0].name} online={props.online} />
|
||||
</div>
|
||||
<div class={styles.row}>
|
||||
<div class={styles.name}>{participants[0].name}</div>
|
||||
<div class={styles.name}>{props.members[0].name}</div>
|
||||
<div class={styles.message}>{t('You can announce your languages in profile')}</div>
|
||||
</div>
|
||||
<div class={styles.activity}>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { For, createSignal, Show, onMount, createEffect, createMemo } from 'solid-js'
|
||||
import type { Author, Chat } from '../../graphql/types.gen'
|
||||
import type { Author, Chat, ChatMember } from '../../graphql/types.gen'
|
||||
import { AuthorCard } from '../Author/Card'
|
||||
import { Icon } from '../_shared/Icon'
|
||||
import { Loading } from '../Loading'
|
||||
|
@ -165,9 +165,7 @@ export const InboxView = () => {
|
|||
</div>
|
||||
<div class="holder">
|
||||
<div class="dialogs">
|
||||
<For each={chats()}>
|
||||
{(chat) => <DialogCard members={[...chat.members, session().user.id]} />}
|
||||
</For>
|
||||
<For each={chats()}>{(chat: Chat) => <DialogCard members={chat.members} />}</For>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user