From f38a4fb7e5ea10120fe3a1334d80c9415e2cd0ac Mon Sep 17 00:00:00 2001 From: bill bittner Date: Thu, 8 Feb 2018 15:47:10 -0800 Subject: [PATCH] preparing to refactor to use ids --- react/actions/show.js | 14 ++++++++++++++ react/containers/ChannelClaimsDisplay/index.js | 9 +++------ react/containers/ChannelClaimsDisplay/view.jsx | 1 + 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/react/actions/show.js b/react/actions/show.js index 4a1a125a..c1b1e96e 100644 --- a/react/actions/show.js +++ b/react/actions/show.js @@ -122,6 +122,20 @@ export function clearShowChannel () { }; }; +// update channel data + +// export function updateChannelClaims () { +// return { +// type: actions.CHANNEL_LIST_UPDATE, // updates claims in channel in channel list +// } +// } + +// export function updateShowChannelClaims () { +// return { +// type: actions.SHOW_CHANNEL_CLAIMS_UPDATE, // update claims in show channel +// } +// } + // add channels to channel list export function addNewChannelToChannelList (id, error, channelData, claimsData) { diff --git a/react/containers/ChannelClaimsDisplay/index.js b/react/containers/ChannelClaimsDisplay/index.js index 7380e2b5..4aee5e8b 100644 --- a/react/containers/ChannelClaimsDisplay/index.js +++ b/react/containers/ChannelClaimsDisplay/index.js @@ -1,5 +1,5 @@ import { connect } from 'react-redux'; -import { updateChannelClaimsData } from 'actions/show'; +import { } from 'actions/show'; import View from './view'; const mapStateToProps = ({ show : { showChannel: { error, channelData, claimsData } } }) => { @@ -16,11 +16,8 @@ const mapStateToProps = ({ show : { showChannel: { error, channelData, claimsDat // const mapDispatchToProps = dispatch => { // return { -// onChannelClaimsDataUpdate: (claims, currentPage, totalPages, totalClaims) => { -// dispatch(updateChannelClaimsData(claims, currentPage, totalPages, totalClaims)); -// }, -// onChannelClaimsDataClear: () => { -// dispatch(updateChannelClaimsData(null, null, null, null)); +// onChannelPageUpdate: (channelRecordId, name, longId, page) => { +// dispatch(updateChannelClaims(channelRecordId, name, longId, page)); // }, // }; // }; diff --git a/react/containers/ChannelClaimsDisplay/view.jsx b/react/containers/ChannelClaimsDisplay/view.jsx index 23d5e6bf..87e88ddd 100644 --- a/react/containers/ChannelClaimsDisplay/view.jsx +++ b/react/containers/ChannelClaimsDisplay/view.jsx @@ -9,6 +9,7 @@ class ChannelClaimsDisplay extends React.Component { } showNewPage (page) { console.log(`update claims data with new page ${page}`); + this.props.onChannelPageUpdate(page); } showPreviousResultsPage () { const previousPage = parseInt(this.props.currentPage) - 1;