Chat list [WiP]
This commit is contained in:
parent
ba7395f4b7
commit
21bf779f24
|
@ -1,6 +1,6 @@
|
|||
import styles from './DialogCard.module.scss'
|
||||
import DialogAvatar from './DialogAvatar'
|
||||
import type { Author, User } from '../../graphql/types.gen'
|
||||
import type { Author, Chat, User } from '../../graphql/types.gen'
|
||||
import { apiClient } from '../../utils/apiClient'
|
||||
import { t } from '../../utils/intl'
|
||||
import { useInbox } from '../../context/inbox'
|
||||
|
@ -9,21 +9,22 @@ type DialogProps = {
|
|||
online?: boolean
|
||||
message?: string
|
||||
counter?: number
|
||||
users: User[]
|
||||
ownSlug: User['slug']
|
||||
users: unknown[]
|
||||
ownSlug: string
|
||||
}
|
||||
|
||||
const DialogCard = (props: DialogProps) => {
|
||||
// @ts-ignore
|
||||
const participants = props.users.filter((user) => user !== props.ownSlug)
|
||||
console.log('!!! participants:', participants)
|
||||
// @ts-ignore
|
||||
const companions = props.users.filter((user) => user !== props.ownSlug)
|
||||
console.log('!!! companions:', companions)
|
||||
return (
|
||||
//DialogCardView - подумать
|
||||
<div class={styles.DialogCard}>
|
||||
<div class={styles.avatar}>{/*<DialogAvatar name={participants[0]} online={props.online} />*/}</div>
|
||||
<div class={styles.row}>
|
||||
{/*<div class={styles.name}>{participants[0]}</div>*/}
|
||||
{/*{companions.length > 1 && (*/}
|
||||
{/* <div class={styles.name}>*/}
|
||||
{/* */}
|
||||
{/* </div>*/}
|
||||
{/*)}*/}
|
||||
<div class={styles.message}>
|
||||
Указать предпочтительные языки для результатов поиска можно в разделе
|
||||
</div>
|
||||
|
|
|
@ -112,6 +112,7 @@ export const InboxView = () => {
|
|||
try {
|
||||
const response = await loadChats()
|
||||
setChats(response as unknown as Chat[])
|
||||
console.log('!!! response:', response)
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user