mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-06-28 16:20:34 +08:00
Fixing the typing for the MessageView forwardRef
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Grid } from "@chakra-ui/react";
|
||||
import { useColorMode } from "@chakra-ui/react";
|
||||
import { forwardRef, useMemo } from "react";
|
||||
import { forwardRef, useColorMode } from "@chakra-ui/react";
|
||||
import { useMemo } from "react";
|
||||
|
||||
import { FlaggableElement } from "./FlaggableElement";
|
||||
|
||||
@@ -43,7 +43,7 @@ export const Messages = ({
|
||||
return <Grid gap={2}>{items}</Grid>;
|
||||
};
|
||||
|
||||
export const MessageView = forwardRef(({ is_assistant, text }: Message, ref) => {
|
||||
export const MessageView = forwardRef<Message, "div">(({ is_assistant, text }: Message, ref) => {
|
||||
const { colorMode } = useColorMode();
|
||||
|
||||
const bgColor = useMemo(() => {
|
||||
|
||||
Reference in New Issue
Block a user