diff --git a/app/src/components/ArtifactComments.tsx b/app/src/components/ArtifactComments.tsx index 9d73464..dc2b59a 100644 --- a/app/src/components/ArtifactComments.tsx +++ b/app/src/components/ArtifactComments.tsx @@ -1,7 +1,5 @@ import { Avatar, createStyles, Group, Paper, rem, Text, TypographyStylesProvider } from '@mantine/core'; import parse from 'html-react-parser'; -import { useHover } from '@mantine/hooks'; -import { useEffect, useState } from 'react'; const useStyles = createStyles(theme => ({ card: { @@ -36,36 +34,6 @@ export interface ArtifactCommentProps { export default function ArtifactComments({ date, body, author }: ArtifactCommentProps) { const { classes } = useStyles(); - const { hovered, ref } = useHover(); - const [color, setColor] = useState('grey'); - const [displayedDate, setDisplayedDate] = useState(date); - - // This changes the UTC date format into the 'mm/dd/yyyy' format - function getDate() { - if (date) { - const stringDate = new Date(date); - return `${stringDate.getMonth() + 1}/${stringDate.getDate()}/${stringDate.getFullYear()}`; - } - } - - const formattedDate = getDate(); - - function changeDate() { - if (displayedDate === date) { - setDisplayedDate(formattedDate); - } else { - setDisplayedDate(date); - } - } - - // Changes the color of the date text depending on if the user is hovering over the text or not - useEffect(() => { - if (hovered === true) { - setColor('blue'); - } else { - setColor('grey'); - } - }, [hovered]); return ( @@ -78,11 +46,9 @@ export default function ArtifactComments({ date, body, author }: ArtifactComment {author ? author : 'Guest'} -
- - {date ? displayedDate : ''} - -
+ + {date ? date : ''} +