mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
channel -> group
This commit is contained in:
1 parent
956070951a
commit
79857fd52a
5 files changed
+21
-22
No files matched your search
@@ -12,8 +12,8 @@ const MessagesList = (): any => {
|
||||
<List className={classes.root}>
|
||||
{messages.map((messageGroup) => (
|
||||
<ListItem
|
||||
key={messageGroup.channelId}
|
||||
onClick={() => setActiveMessageGroupId(messageGroup.channelId)}
|
||||
key={messageGroup.groupId}
|
||||
onClick={() => setActiveMessageGroupId(messageGroup.groupId)}
|
||||
divider
|
||||
button
|
||||
>
|
||||
@@ -21,7 +21,7 @@ const MessagesList = (): any => {
|
||||
<MuiAvatar />
|
||||
</ListItemAvatar>
|
||||
<ListItemText>
|
||||
{messageGroup.channelDisplay}
|
||||
{messageGroup.groupDisplay}
|
||||
</ListItemText>
|
||||
</ListItem>
|
||||
))}
|
||||
|
||||
@@ -25,7 +25,7 @@ export const MessageModal = () => {
|
||||
|
||||
const closeModal = () => setActiveMessageGroupId(null);
|
||||
const isOpen = activeMessageGroupId !== null;
|
||||
const activeMessageGroup = messages.find(messageGroup => messageGroup.channelId === activeMessageGroupId);
|
||||
const activeMessageGroup = messages.find(messageGroup => messageGroup.groupId === activeMessageGroupId);
|
||||
const activeMessages = activeMessageGroup ? activeMessageGroup.messages : [];
|
||||
|
||||
return (
|
||||
|
||||
Whitespace-only changes.
@@ -2,7 +2,7 @@ export interface Message {
|
||||
id?: number;
|
||||
content: string;
|
||||
user_identifier: string;
|
||||
channel_id: number;
|
||||
group_id: number;
|
||||
isRead: boolean;
|
||||
isMine: boolean;
|
||||
avatar?: string;
|
||||
@@ -13,9 +13,9 @@ export interface Message {
|
||||
}
|
||||
|
||||
export interface MessageGroup {
|
||||
channelId: string;
|
||||
groupId: string;
|
||||
messages: Message[];
|
||||
channelDisplay: string;
|
||||
groupDisplay: string;
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
}
|
||||
Reference in new issue
Block a user