diff options
author | 2019-02-21 00:20:21 +0300 | |
---|---|---|
committer | 2023-01-13 10:37:54 +0300 | |
commit | d01d3369318b79f4f38820ef8c48344a6b082aff (patch) | |
tree | 3ec47c71215ff8e514646c5bb695cbc5df286403 /vnext/src/components/PM.js | |
parent | e39818079a05cdd7cfc4744e972ce87105e1ff87 (diff) |
More pure components
Diffstat (limited to 'vnext/src/components/PM.js')
-rw-r--r-- | vnext/src/components/PM.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vnext/src/components/PM.js b/vnext/src/components/PM.js index 6b8c053b..a1e70ad5 100644 --- a/vnext/src/components/PM.js +++ b/vnext/src/components/PM.js @@ -5,7 +5,7 @@ import { UserType, MessageType } from './Types'; import Avatar from './Avatar'; import { format } from '../utils/embed'; -export default function PM(props) { +function PM(props) { const { chat } = props; return ( <li> @@ -19,6 +19,8 @@ export default function PM(props) { ); } +export default React.memo(PM); + function bubbleStyle(me, msg) { const isMe = me.uid === msg.user.uid; const color = isMe ? '#fff' : '#222'; |