-
Notifications
You must be signed in to change notification settings - Fork 414
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e5e4a56
commit cb2c33a
Showing
12 changed files
with
881 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { connect } from 'react-redux'; | ||
import { doReportContent } from 'redux/actions/reportContent'; | ||
import { selectActiveChannelClaim, selectIncognito } from 'redux/selectors/app'; | ||
import { selectIsReportingContent, selectReportContentError } from 'redux/selectors/reportContent'; | ||
import { makeSelectClaimForClaimId, doClaimSearch } from 'lbry-redux'; | ||
import { withRouter } from 'react-router'; | ||
import ReportContent from './view'; | ||
|
||
const select = (state, props) => { | ||
const { search } = props.location; | ||
const urlParams = new URLSearchParams(search); | ||
const claimId = urlParams.get('claimId'); | ||
|
||
return { | ||
isReporting: selectIsReportingContent(state), | ||
error: selectReportContentError(state), | ||
activeChannelClaim: selectActiveChannelClaim(state), | ||
incognito: selectIncognito(state), | ||
claimId: claimId, | ||
claim: makeSelectClaimForClaimId(claimId)(state), | ||
}; | ||
}; | ||
|
||
const perform = (dispatch) => ({ | ||
doClaimSearch: (options) => dispatch(doClaimSearch(options)), | ||
doReportContent: (category, params) => dispatch(doReportContent(category, params)), | ||
}); | ||
|
||
export default withRouter(connect(select, perform)(ReportContent)); |
Oops, something went wrong.