Merge pull request #443 from tomalrussell/fix/like

Fix/like
This commit is contained in:
Tom Russell 2019-10-02 12:32:25 +01:00 committed by GitHub
commit 903208f059
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -32,7 +32,7 @@ const LikeDataEntry: React.FunctionComponent<any> = (props) => { // TODO: remove
id="like" name="like" id="like" name="like"
checked={!!props.building_like} checked={!!props.building_like}
disabled={props.mode === 'view'} disabled={props.mode === 'view'}
onChange={props.handleLike} onChange={props.onLike}
/> />
<label htmlFor="like" className="form-check-label"> <label htmlFor="like" className="form-check-label">
I like this building and think it contributes to the city! I like this building and think it contributes to the city!

View File

@ -221,6 +221,7 @@ const withCopyEdit = (WrappedComponent) => {
} }
<WrappedComponent <WrappedComponent
building={this.state.building} building={this.state.building}
building_like={this.props.building_like}
mode={this.props.mode} mode={this.props.mode}
copy={copy} copy={copy}
onChange={this.handleChange} onChange={this.handleChange}

View File

@ -12,7 +12,7 @@ const LikeView = (props) => (
value={props.building.likes_total} value={props.building.likes_total}
mode={props.mode} mode={props.mode}
onLike={props.onLike} onLike={props.onLike}
user_building_like={props.building_like} building_like={props.building_like}
/> />
</Fragment> </Fragment>
) )