diff options
author | kibigo! <marrus-sh@users.noreply.github.com> | 2018-01-03 12:36:21 -0800 |
---|---|---|
committer | kibigo! <marrus-sh@users.noreply.github.com> | 2018-01-04 18:33:13 -0800 |
commit | 42f50049ff29ccdc484c22f8a5a19cda2dd03a5b (patch) | |
tree | 5e04c0bc0106f634316202eb8dc2f8c356d1b556 /app/javascript/flavours/glitch/components | |
parent | b4a3792201ccc01713b536e50428e027bd094d2b (diff) |
WIP <Compose> Refactor; 1000 tiny edits
Diffstat (limited to 'app/javascript/flavours/glitch/components')
-rw-r--r-- | app/javascript/flavours/glitch/components/dropdown_menu.js | 5 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/components/link.js | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/components/dropdown_menu.js b/app/javascript/flavours/glitch/components/dropdown_menu.js index 519941dd6..706390c92 100644 --- a/app/javascript/flavours/glitch/components/dropdown_menu.js +++ b/app/javascript/flavours/glitch/components/dropdown_menu.js @@ -134,11 +134,12 @@ export default class Dropdown extends React.PureComponent { this.props.onModalOpen({ status, actions: items.map( - (item, i) => ({ + (item, i) => item ? { ...item, name: `${item.text}-${i}`, onClick: this.handleItemClick.bind(i), - }), + } : null + ), }); return; diff --git a/app/javascript/flavours/glitch/components/link.js b/app/javascript/flavours/glitch/components/link.js index c49fc487c..de99f7d42 100644 --- a/app/javascript/flavours/glitch/components/link.js +++ b/app/javascript/flavours/glitch/components/link.js @@ -45,7 +45,7 @@ export default class Link extends React.PureComponent { title, ...rest } = this.props; - const computedClass = classNames('link', className, role); + const computedClass = classNames('link', className, `role-${role}`); // We assume that our `onClick` is a routing function and give it // the qualities of a link even if no `href` is provided. However, |