Skip to content

Commit

Permalink
fix(similar-profiles): Fix "Suivre" not triggering anything
Browse files Browse the repository at this point in the history
  • Loading branch information
lutangar committed Oct 26, 2020
1 parent e5d6ec1 commit d8d7942
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/app/profiles/App/SimilarProfiles/SimilarProfiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ interface SimilarProfilesProps {
loading?: boolean;
similarContributors: StatefulContributor[];
contributors: StatefulContributor[];
subscribe: (contributor: StatefulContributor) => void;
unsubscribe: (contributor: StatefulContributor) => void;
subscribe: (contributor: StatefulContributor) => () => void;
unsubscribe: (contributor: StatefulContributor) => () => void;
className?: string;
}

Expand Down Expand Up @@ -77,8 +77,8 @@ const SimilarProfiles = ({
<ContributorCompact
key={contributor.id}
contributor={contributor}
onSubscribe={() => subscribe(contributor)}
onUnsubscribe={() => unsubscribe(contributor)}
onSubscribe={subscribe(contributor)}
onUnsubscribe={unsubscribe(contributor)}
to={pathToContributor(contributor)}
/>
))}
Expand Down
8 changes: 4 additions & 4 deletions src/app/profiles/App/SimilarProfiles/withConnect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { extensionMessageSender } from 'app/profiles/extensionId';

export interface ConnectedSimilarProfileProps
extends RouteComponentProps<{ id: string }> {
subscribe?: (contributor: Contributor) => void;
unsubscribe?: (contributor: Contributor) => void;
subscribe?: (contributor: Contributor) => () => void;
unsubscribe?: (contributor: Contributor) => () => void;
}

const mapStateToProps = (
Expand All @@ -27,9 +27,9 @@ const mapStateToProps = (
});

const mapDispatchToProps = (dispatch: Dispatch) => ({
subscribe: (contributor: Contributor) =>
subscribe: (contributor: Contributor) => () =>
dispatch(subscribe(contributor.id, { receiver: extensionMessageSender })),
unsubscribe: (contributor: Contributor) =>
unsubscribe: (contributor: Contributor) => () =>
dispatch(unsubscribe(contributor.id, { receiver: extensionMessageSender }))
});

Expand Down

0 comments on commit d8d7942

Please sign in to comment.