Last active
September 26, 2020 22:13
-
-
Save lushiyun/42ef1861b95fe84af31e8606e3cf3849 to your computer and use it in GitHub Desktop.
Revisions
-
lushiyun revised this gist
Sep 26, 2020 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ ... // omitted other imports import { selectMessagesByTeam } from './messagesSlice' import { useSelector } from 'react-redux' import MessageItem from './MessageItem' -
lushiyun revised this gist
Sep 26, 2020 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,5 @@ ... // omitted other imports import { useSelector } from 'react-redux' import MessageItem from './MessageItem' const MessagesList = () => { -
lushiyun created this gist
Sep 26, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ ... // omitted other imports import { useSelector } from 'react-redux' import { selectMessagesByTeam } from './messagesSlice' import MessageItem from './MessageItem' const MessagesList = () => { ... const messages = useSelector((state) => selectMessagesByTeam(state, teamId)) const renderedMessages = messages && messages.map((message) => ( <MessageItem key={message.id} message={message} /> )) ... }