refactor: more TS code
This commit is contained in:
@@ -14,7 +14,7 @@ const PreviewMessage: FC<Props> = ({ mid = 0 }) => {
|
||||
return { msg: store.message[mid], usersData: store.users.byId };
|
||||
});
|
||||
if (!msg) return null;
|
||||
const { from_uid, created_at, content_type, content, thumbnail, properties } = msg;
|
||||
const { from_uid, created_at, content_type, content, thumbnail = "", properties } = msg;
|
||||
const { name, avatar } = usersData[from_uid] || {};
|
||||
return (
|
||||
<StyledWrapper className={`preview`}>
|
||||
|
||||
Reference in New Issue
Block a user