Skip to content

Commit

Permalink
Remove unneccesary return clauses
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Campbell committed Oct 23, 2020
1 parent b0d230a commit d9bf26b
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions src/components/ItemBodyView/ItemBodyView.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,19 @@ export default function ItemBodyView({ item }) {
const generateTimelineItem = (section) => {
switch (section.type) {
case "directory_information":
return (
<DirectoryInformation section={section} />
);
return <DirectoryInformation section={section} />
case "initial_message":
return (
<MessageView {...section} />
);
return <MessageView {...section} />
case "edit":
return (
<TimelineActionCard {...section} />
);
return <TimelineActionCard {...section} />
case "status":
return (
<TimelineActionCard {...section} />
);
return <TimelineActionCard {...section} />
case "assignment":
return (
<Assignment {...section} />
);
return <Assignment {...section} />
case "reply_to_user":
return (
<TimelineActionCard {...section} />
);
return <TimelineActionCard {...section} />
case "reply_from_user":
return (
<MessageView {...section} />
);
return <MessageView {...section} />
default:
return `No match found for type: ${section.type}`;
};
Expand Down

0 comments on commit d9bf26b

Please sign in to comment.