Skip to content

Commit

Permalink
perf(components): avoir Container unmount
Browse files Browse the repository at this point in the history
  • Loading branch information
JalilArfaoui committed Aug 9, 2019
1 parent 3192d34 commit 2b49d4e
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/components/organisms/Contributor/ContributorButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,11 @@ interface Props {
followed?: boolean;
}

const ContributorButton = ({ followed }: Props) =>
followed ? (
<Container>
<BackgroundButton>Abonné</BackgroundButton>
</Container>
) : (
<Container>
<BorderButton>Suivre</BorderButton>
</Container>
);
const ContributorButton = ({ followed }: Props) => (
<Container>
{followed && <BackgroundButton>Abonné</BackgroundButton>}
{!followed && <BorderButton>Suivre</BorderButton>}
</Container>
);

export default ContributorButton;

0 comments on commit 2b49d4e

Please sign in to comment.