Skip to content

Commit

Permalink
eslint scope nag
Browse files Browse the repository at this point in the history
  • Loading branch information
flacoman91 committed Jul 8, 2020
1 parent 824ad6b commit 22219f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/components/Trends/TrendDepthToggle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class TrendDepthToggle extends React.Component {
}

render() {
const { diff, increaseDepth, resetDepth, showToggle } = this.props
const { diff, increaseDepth, depthReset, showToggle } = this.props
if ( showToggle ) {
if ( this._showMore() ) {
return <div className={ 'trend-depth-toggle' }>
Expand All @@ -40,7 +40,7 @@ export class TrendDepthToggle extends React.Component {
<button className={ 'a-btn a-btn__link' }
id={ 'trend-depth-button' }
onClick={ () => {
resetDepth()
depthReset()
} }>
<span className={ 'minus' }></span>
Show less
Expand All @@ -56,7 +56,7 @@ export const mapDispatchToProps = dispatch => ( {
increaseDepth: diff => {
dispatch( changeDepth( diff + 5 ) )
},
resetDepth: () => {
depthReset: () => {
dispatch( resetDepth() )
}
} )
Expand Down
4 changes: 2 additions & 2 deletions src/components/__tests__/TrendDepthToggle.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function setupEnzyme( { cbIncrease, cbReset, diff, queryCount, resultCount } ) {
return shallow( <TrendDepthToggle diff={ diff }
increaseDepth={ cbIncrease }
lens={ 'Product' }
resetDepth={ cbReset }
depthReset={ cbReset }
queryCount={ queryCount }
resultCount={ resultCount }
showToggle={ true }/> )
Expand Down Expand Up @@ -152,7 +152,7 @@ describe( 'component:TrendDepthToggle', () => {

it( 'hooks into resetDepth', () => {
const dispatch = jest.fn()
mapDispatchToProps( dispatch ).resetDepth()
mapDispatchToProps( dispatch ).depthReset()
expect( dispatch.mock.calls ).toEqual( [
[ {
requery: REQUERY_ALWAYS,
Expand Down

0 comments on commit 22219f1

Please sign in to comment.