From 2b49d4e948f69ab84b445aec75c34ac3b41bb999 Mon Sep 17 00:00:00 2001 From: Jalil Arfaoui Date: Fri, 9 Aug 2019 21:50:46 +0200 Subject: [PATCH] perf(components): avoir Container unmount --- .../organisms/Contributor/ContributorButton.tsx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/components/organisms/Contributor/ContributorButton.tsx b/src/components/organisms/Contributor/ContributorButton.tsx index 0a08da34b..372014c29 100644 --- a/src/components/organisms/Contributor/ContributorButton.tsx +++ b/src/components/organisms/Contributor/ContributorButton.tsx @@ -18,15 +18,11 @@ interface Props { followed?: boolean; } -const ContributorButton = ({ followed }: Props) => - followed ? ( - - Abonné - - ) : ( - - Suivre - - ); +const ContributorButton = ({ followed }: Props) => ( + + {followed && Abonné} + {!followed && Suivre} + +); export default ContributorButton;