forked from abner/for-legacy-web
chore: split content into content, system
This commit is contained in:
@@ -228,7 +228,7 @@ export default observer(({ channel }: Props) => {
|
||||
);
|
||||
renderer.messages.reverse();
|
||||
|
||||
if (msg) {
|
||||
if (msg?.content) {
|
||||
// eslint-disable-next-line prefer-const
|
||||
let [_, toReplace, newText, flags] = content.split(/\//);
|
||||
|
||||
|
||||
@@ -77,11 +77,8 @@ export const SystemMessage = observer(
|
||||
iconDictionary[data.type as API.SystemMessage["type"]] ??
|
||||
InfoCircle;
|
||||
|
||||
let children;
|
||||
let children = null;
|
||||
switch (data.type) {
|
||||
case "text":
|
||||
children = <span>{data.content}</span>;
|
||||
break;
|
||||
case "user_added":
|
||||
case "user_remove":
|
||||
children = (
|
||||
|
||||
Reference in New Issue
Block a user