Skip to content

Commit

Permalink
Revert "Use createMatchSelector selector in LinkdropLanding component (
Browse files Browse the repository at this point in the history
…#1966)"

This reverts commit 8ad0535.
  • Loading branch information
marcinbodnar committed Oct 20, 2021
1 parent 06df183 commit 0767dc5
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions packages/frontend/src/components/accounts/LinkdropLanding.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { createMatchSelector } from 'connected-react-router';
import React, { Component } from 'react';
import { Translate } from 'react-localize-redux';
import { connect } from 'react-redux';
Expand Down Expand Up @@ -171,16 +170,12 @@ const mapDispatchToProps = {
setLinkdropAmount
};

const mapStateToProps = (state) => {
const matchSelector = createMatchSelector('/linkdrop/:fundingContract?/:fundingKey?');

return {
...selectAccountSlice(state),
fundingContract: matchSelector(state)?.params.fundingContract,
fundingKey: matchSelector(state)?.params.fundingKey,
mainLoader: selectStatusMainLoader(state)
};
};
const mapStateToProps = (state, { match }) => ({
...selectAccountSlice(state),
fundingContract: match.params.fundingContract,
fundingKey: match.params.fundingKey,
mainLoader: selectStatusMainLoader(state)
});

export const LinkdropLandingWithRouter = connect(
mapStateToProps,
Expand Down

0 comments on commit 0767dc5

Please sign in to comment.