20 lines
437 B
TypeScript
20 lines
437 B
TypeScript
|
import { Conversation, Database } from "types";
|
||
|
import { msg_style } from "style";
|
||
|
import RenderMsg from "components/RenderMsg.tsx";
|
||
|
|
||
|
export default function Msg({
|
||
|
message,
|
||
|
db,
|
||
|
conversation,
|
||
|
...props
|
||
|
}: {
|
||
|
message: string;
|
||
|
db: Database;
|
||
|
conversation?: Conversation;
|
||
|
}) {
|
||
|
const msg = db.messages[message];
|
||
|
return (
|
||
|
<RenderMsg msg={msg} db={db} conversation={conversation} {...props} />
|
||
|
);
|
||
|
}
|