Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upClosing bracket alignment #411
Comments
This comment has been minimized.
This comment has been minimized.
|
Try this instead: <Link to={this.props.page === 1 ? 'javascript:void(0)' : `/?page=${this.props.page - 1}`}
className={this.props.page === 1 ? 'pagination__link disabled' : 'pagination__link'}
onClick={this.props.page === 1 ? () => {} : this.getMoreBookmarks}
disabled={this.props.page === 1}
data-hook='previous'
>
❮ Previous
</Link><SearchForm dispatch={props.dispatch}
history={props.history}
searchTerm={props.searchTerm}
/> |
feross
closed this
Feb 7, 2016
feross
added
the
question
label
Feb 7, 2016
This comment has been minimized.
This comment has been minimized.
|
Thanks @feross. I can do that, just looks a bit silly. |
This comment has been minimized.
This comment has been minimized.
|
Writing it like this makes more sense, to me: <Link
to={this.props.page === 1 ? 'javascript:void(0)' : `/?page=${this.props.page - 1}`}
className={this.props.page === 1 ? 'pagination__link disabled' : 'pagination__link'}
onClick={this.props.page === 1 ? () => {} : this.getMoreBookmarks}
disabled={this.props.page === 1}
data-hook='previous'
>
❮ Previous
</Link><SearchForm
dispatch={props.dispatch}
history={props.history}
searchTerm={props.searchTerm}
/> |
This comment has been minimized.
This comment has been minimized.
|
Yeah, definitely looks better. I'll experiment with it. Thanks again! |
lock
bot
locked as resolved and limited conversation to collaborators
May 10, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
mike-engel commentedFeb 6, 2016
Just upgraded to 6.0.1, which has been great and provided even more (missing) consistency. I do feel like the closing bracket rule should either be modified or removed. What I believe the rule is trying to enforce:
Which is great! But with self-closing tags with a lot of attributes, it gets tricky.
This is probably an error with ESLint, but I figured I'd start here first. Thanks!