From a2475a46a6fe6a82bd355cd6c366d78bffce54d2 Mon Sep 17 00:00:00 2001 From: Kritik Jiyaviya Date: Mon, 16 Oct 2023 13:51:35 +0530 Subject: [PATCH] Convert ./components/integrations/integration_option.tsx to functional component (#24806) * Convert ./components/integrations/integration_option.tsx to functional component * update integration_option component * improve integration_option component --- .../integrations/integration_option.tsx | 44 +++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/webapp/channels/src/components/integrations/integration_option.tsx b/webapp/channels/src/components/integrations/integration_option.tsx index 7ec52e6a27..65df787846 100644 --- a/webapp/channels/src/components/integrations/integration_option.tsx +++ b/webapp/channels/src/components/integrations/integration_option.tsx @@ -11,27 +11,25 @@ type Props = { link: string; } -export default class IntegrationOption extends React.PureComponent { - render() { - const {image, title, description, link} = this.props; +const IntegrationOption = ({image, title, description, link}: Props) => { + return ( + + {'integration +
+ {title} +
+
+ {description} +
+ + ); +}; - return ( - - {'integration -
- {title} -
-
- {description} -
- - ); - } -} +export default React.memo(IntegrationOption);