fix: unknown message styling

This commit is contained in:
abdou6666 2025-04-16 14:56:40 +01:00
parent ba729de340
commit bc0a9d5151

View File

@ -30,7 +30,17 @@ const FileMessage: React.FC<FileMessageProps> = ({ message }) => {
throw new Error("Unable to detect type for file message"); throw new Error("Unable to detect type for file message");
} }
if (message.data.type === "unknown") { if (message.data.type === "unknown") {
return <p className="error-message">unknown file type</p>; return (
<div
className="sc-message--file"
style={{
color: colors.text,
backgroundColor: colors.bg,
}}
>
<p className="error-message">{t("messages.unsupported_file_type")}</p>;
</div>
);
} }
if ( if (
message.data && message.data &&