Skip to content

Commit

Permalink
Merge pull request #37 from natron-io/fix_emptymessages
Browse files Browse the repository at this point in the history
show message when no slack messages are received
  • Loading branch information
michaelmumenthaler authored Feb 11, 2022
2 parents b471af5 + d1a3327 commit 6d1abb0
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/Components/Notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,22 @@ export default function Notifications() {
>
{notificationsLoaded ? (
<>
{notifications
? notifications.map((message: any, index) => (
<MessageCard
key={message.client_msg_id}
message={message.message}
messageLink={message.link_to_message}
timestamp={message.unix_timestamp}
userAvatarUrl={message.user_avatar_url}
userRealName={message.user_real_name}
/>
))
: "NO MESSAGES"}
{notifications.length > 0 ? (
notifications.map((message: any, index) => (
<MessageCard
key={message.client_msg_id}
message={message.message}
messageLink={message.link_to_message}
timestamp={message.unix_timestamp}
userAvatarUrl={message.user_avatar_url}
userRealName={message.user_real_name}
/>
))
) : (
<Typography variant="h4" component="div" gutterBottom>
Keine Nachrichten
</Typography>
)}
</>
) : (
<CircularProgress color="primary" />
Expand Down

0 comments on commit 6d1abb0

Please sign in to comment.