Fixing a small remaining issues, reporting labels, rejecting tasks, and redirecting users on landing page

This commit is contained in:
Keith Stevens
2023-01-10 12:51:56 +09:00
parent 942dc42d03
commit 2e2efdec65
4 changed files with 18 additions and 4 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ export const FlaggableElement = (props) => {
});
const { trigger } = useSWRMutation("/api/set_label", poster, {
onSuccess: () => {
setIsEditing.off;
setIsEditing.off();
},
});
+5 -3
View File
@@ -1,6 +1,6 @@
import { Grid } from "@chakra-ui/react";
import { useColorMode } from "@chakra-ui/react";
import { useMemo } from "react";
import { forwardRef, useMemo } from "react";
import { FlaggableElement } from "./FlaggableElement";
@@ -43,7 +43,7 @@ export const Messages = ({
return <Grid gap={2}>{items}</Grid>;
};
export const MessageView = ({ is_assistant, text, message_id }: Message) => {
export const MessageView = forwardRef(({ is_assistant, text, message_id }: Message, ref) => {
const { colorMode } = useColorMode();
const bgColor = useMemo(() => {
@@ -55,4 +55,6 @@ export const MessageView = ({ is_assistant, text, message_id }: Message) => {
}, [colorMode, is_assistant]);
return <div className={`${bgColor} p-4 rounded-md text-white whitespace-pre-wrap`}>{text}</div>;
};
});
MessageView.displayName = "MessageView";