pre-commit

This commit is contained in:
jojopirker
2023-01-04 15:42:51 +01:00
parent be22c77b07
commit 910c1c88ce
3 changed files with 39 additions and 41 deletions
@@ -2,18 +2,18 @@ import { Avatar, Box, HStack, useColorModeValue } from "@chakra-ui/react";
import { FlaggableElement } from "../FlaggableElement";
export function MessageTableEntry ({ item, idx }) {
const bgColor = useColorModeValue(idx % 2 === 0 ? "bg-slate-800" : "bg-black", "bg-sky-900");
return (
<FlaggableElement text={item.text} post_id={item.id} key={`flag_${item.id}`}>
<HStack>
<Avatar
name={`${item.isAssistant ? "Assitant" : "User"}`}
src={`${item.isAssistant ? "/logos/logo.png" : "/images/temp-avatars/av1.jpg"}`}
/>
<Box className={`p-4 rounded-md text-white whitespace-pre-wrap ${bgColor} text-white w-full`}>{item.text}</Box>
</HStack>
</FlaggableElement>
);
};
export function MessageTableEntry({ item, idx }) {
const bgColor = useColorModeValue(idx % 2 === 0 ? "bg-slate-800" : "bg-black", "bg-sky-900");
return (
<FlaggableElement text={item.text} post_id={item.id} key={`flag_${item.id}`}>
<HStack>
<Avatar
name={`${item.isAssistant ? "Assitant" : "User"}`}
src={`${item.isAssistant ? "/logos/logo.png" : "/images/temp-avatars/av1.jpg"}`}
/>
<Box className={`p-4 rounded-md text-white whitespace-pre-wrap ${bgColor} text-white w-full`}>{item.text}</Box>
</HStack>
</FlaggableElement>
);
}