diff --git a/src/components/ItemBodyView/ItemBodyView.js b/src/components/ItemBodyView/ItemBodyView.js
index bed15c1..83f76ad 100644
--- a/src/components/ItemBodyView/ItemBodyView.js
+++ b/src/components/ItemBodyView/ItemBodyView.js
@@ -8,35 +8,33 @@ import { objectIsEmpty } from "../../utilities";
export default function ItemBodyView({ item }) {
- const theme = webqueue2Theme(false);
- const useStyles = makeStyles((theme) => ({
+ const useStyles = makeStyles(() => ({
missingOppositeContent: {
'&:before': {
content: '""',
flex: 0,
padding: '0',
},
- },
- }));
- const classes = useStyles(theme);
+ }}));
+ const classes = useStyles();
const generateTimelineItem = (section) => {
- switch(section.type) {
- case "directoryInformation":
- if (section.content.length === 0){
+ switch (section.type) {
+ case "directory_information":
+ if (Object.entries(section) === 0) {
return "No Directory Information";
} else {
return "Directory Information Present"
}
- case "initialMessage":
- return(
+ case "initial_message":
+ return (
<>
{section.content.map((line, index) => {line})}
>
);
case "edit":
- return(
+ return (
<>
{`${section.by} assigned thisat ${Date(section.datetime)}`}
@@ -45,7 +43,7 @@ export default function ItemBodyView({ item }) {
>
);
case "status":
- return(
+ return (
<>
{`${section.by} update the status to at ${Date(section.datetime)}`}
@@ -53,14 +51,14 @@ export default function ItemBodyView({ item }) {
{section.content.map((line) => {line})}
>
);
- case "assign":
+ case "assignment":
return (
{`${section.by} assigned this to ${section.to} at ${Date(section.datetime)}`}
);
- case "replyToUser":
- return(
+ case "reply_to_user":
+ return (
<>
{`${section.by} replied ${Date(section.datetime)}`}
@@ -68,8 +66,8 @@ export default function ItemBodyView({ item }) {
{section.content.map((line) => {line})}
>
);
- case "replyFromUser":
- return(
+ case "reply_from_user":
+ return (
<>
{section.content.map((line, index) => {line})}
@@ -81,20 +79,22 @@ export default function ItemBodyView({ item }) {
};
return (
-
- {objectIsEmpty(item) ? "" : item.content.map((section, index) => {
- return (
-
-
-
-
-
-
- {generateTimelineItem(section)}
-
-
- );
- })}
+
+ {objectIsEmpty(item) ? "" : item.content.map((section) => (
+
+
+
+
+
+
+ {generateTimelineItem(section)}
+
+
+ ))}
);
};