diff --git a/webapp/channels/src/components/post_view/embedded_bindings/embedded_bindings.tsx b/webapp/channels/src/components/post_view/embedded_bindings/embedded_bindings.tsx index 671167a8a19..81892ea3ddb 100644 --- a/webapp/channels/src/components/post_view/embedded_bindings/embedded_bindings.tsx +++ b/webapp/channels/src/components/post_view/embedded_bindings/embedded_bindings.tsx @@ -1,7 +1,7 @@ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. -import React from 'react'; +import React, {memo} from 'react'; import type {AppBinding} from '@mattermost/types/apps'; import type {Post} from '@mattermost/types/posts'; @@ -29,31 +29,24 @@ type Props = { } -export default class EmbeddedBindings extends React.PureComponent { - static defaultProps = { - imagesMetadata: {}, - }; +const EmbeddedBindings = ({ + embeds, + post, + options, +}: Props) => ( +
+ {embeds.map((embed, i) => ( + + ))} +
+); - render() { - const content = [] as JSX.Element[]; - this.props.embeds.forEach((embed, i) => { - content.push( - , - ); - }); - - return ( -
- {content} -
- ); - } -} +export default memo(EmbeddedBindings);