diff --git a/webapp/channels/src/components/post_view/floating_timestamp/floating_timestamp.tsx b/webapp/channels/src/components/post_view/floating_timestamp/floating_timestamp.tsx index b1b339b72b..5c33bfd0ee 100644 --- a/webapp/channels/src/components/post_view/floating_timestamp/floating_timestamp.tsx +++ b/webapp/channels/src/components/post_view/floating_timestamp/floating_timestamp.tsx @@ -17,35 +17,33 @@ type Props = { isRhsPost?: boolean; } -export default class FloatingTimestamp extends React.PureComponent { - render() { - const {createAt, isScrolling, isRhsPost, toastPresent} = this.props; - - if (createAt === 0) { - return null; - } - - const classes = classNames('post-list__timestamp', { - scrolling: isScrolling, - rhs: isRhsPost, - toastAdjustment: toastPresent, - }); - - return ( -
-
- - - -
-
- ); +const FloatingTimestamp = ({createAt, isScrolling, isRhsPost, toastPresent}: Props) => { + if (createAt === 0) { + return null; } -} + + const classes = classNames('post-list__timestamp', { + scrolling: isScrolling, + rhs: isRhsPost, + toastAdjustment: toastPresent, + }); + + return ( +
+
+ + + +
+
+ ); +}; + +export default React.memo(FloatingTimestamp);