[MM-55333] Convert ./components/post_view/floating_timestamp/floating_timestamp.tsx from Class Component to Function Component (#25401)

Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
Syed Ali Abbas Zaidi 2023-11-14 14:01:10 +05:00 committed by GitHub
parent 5dea20dd3e
commit b5bbe278eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,10 +17,7 @@ type Props = {
isRhsPost?: boolean; isRhsPost?: boolean;
} }
export default class FloatingTimestamp extends React.PureComponent<Props> { const FloatingTimestamp = ({createAt, isScrolling, isRhsPost, toastPresent}: Props) => {
render() {
const {createAt, isScrolling, isRhsPost, toastPresent} = this.props;
if (createAt === 0) { if (createAt === 0) {
return null; return null;
} }
@ -47,5 +44,6 @@ export default class FloatingTimestamp extends React.PureComponent<Props> {
</div> </div>
</div> </div>
); );
} };
}
export default React.memo(FloatingTimestamp);