Skip to content

Commit

Permalink
StrategyList > getRepeatedProps [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
icecream17 committed May 21, 2021
1 parent 84471ff commit 002de4d
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/Elems/AsideElems/StrategyList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,35 @@ export default class StrategyList extends React.Component<StrategyListProps> {
return index++
}

const getRepeatedProps = () => {
return {
solver: this.props.solver,
index: getIndex()
}
}

return (
<ol className='StrategyList' id='StrategyList'>
<StrategyItem
name='Check for solved'
description='Checks if a cell has only 1 possibility left\n[todo]'
required='true'
solver={this.props.solver}
index={getIndex()}
{...getRepeatedProps()}
/>
<StrategyItem
name='Update candidates'
description='[todo]'
solver={this.props.solver}
index={getIndex()}
{...getRepeatedProps()}
/>
<StrategyItem
name='Example strategy 1'
description='[todo]'
solver={this.props.solver}
index={getIndex()}
{...getRepeatedProps()}
/>
<StrategyItem
name='Another Example strategy'
description='[todo]'
solver={this.props.solver}
index={getIndex()}
{...getRepeatedProps()}
/>
</ol>
)
Expand Down

0 comments on commit 002de4d

Please sign in to comment.