mirror of
https://github.com/spacebarchat/client.git
synced 2024-11-22 18:32:34 +01:00
temporary placeholder for other message types
This commit is contained in:
parent
a3a3135e2c
commit
8b908f9bf0
@ -1,3 +1,4 @@
|
||||
import { MessageType } from "@spacebarchat/spacebar-api-types/v9";
|
||||
import React from "react";
|
||||
import Moment from "react-moment";
|
||||
import styled from "styled-components";
|
||||
@ -141,9 +142,13 @@ function Message({ message, isHeader, isSending, isFailed }: Props) {
|
||||
</MessageHeader>
|
||||
)}
|
||||
|
||||
{message.type === MessageType.Default ? (
|
||||
<MessageContent sending={isSending} failed={isFailed}>
|
||||
{message.content}
|
||||
</MessageContent>
|
||||
) : (
|
||||
<div style={{ color: "var(--text-secondary)" }}>MessageType: {MessageType[message.type]}</div>
|
||||
)}
|
||||
</MessageContentContainer>
|
||||
</Container>
|
||||
</MessageListItem>
|
||||
|
@ -1,4 +1,5 @@
|
||||
import type { APIMessage } from "@spacebarchat/spacebar-api-types/v9";
|
||||
import { MessageType } from "@spacebarchat/spacebar-api-types/v9";
|
||||
import { action, computed, makeAutoObservable, observable } from "mobx";
|
||||
|
||||
import type { IObservableArray } from "mobx";
|
||||
@ -25,6 +26,7 @@ export interface QueuedMessage {
|
||||
author: User;
|
||||
content: string;
|
||||
timestamp: Date;
|
||||
type: MessageType;
|
||||
}
|
||||
|
||||
export default class MessageQueue {
|
||||
@ -42,6 +44,7 @@ export default class MessageQueue {
|
||||
...data,
|
||||
timestamp: new Date(),
|
||||
status: QueuedMessageStatus.SENDING,
|
||||
type: MessageType.Default,
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user