diff options
author | cwm <chriswmartin@protonmail.com> | 2017-12-12 22:50:20 -0600 |
---|---|---|
committer | cwm <chriswmartin@protonmail.com> | 2017-12-12 22:50:20 -0600 |
commit | 9719983f2dcd8c47b7c6f59b46460a7a4878d8d4 (patch) | |
tree | 25fd74b87f83979296d35f7793574806370d3938 /app/javascript/flavours | |
parent | b6ded7119ea4d13b03db4c384cc57b41f11a4811 (diff) |
move list items into an array, don't unnecessarily concat misc nav item
Diffstat (limited to 'app/javascript/flavours')
-rw-r--r-- | app/javascript/flavours/glitch/features/getting_started/index.js | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/app/javascript/flavours/glitch/features/getting_started/index.js b/app/javascript/flavours/glitch/features/getting_started/index.js index 11fdd2344..af1021dca 100644 --- a/app/javascript/flavours/glitch/features/getting_started/index.js +++ b/app/javascript/flavours/glitch/features/getting_started/index.js @@ -76,6 +76,7 @@ export default class GettingStarted extends ImmutablePureComponent { const { intl, myAccount, columns, multiColumn, lists } = this.props; let navItems = []; + let listItems = []; if (multiColumn) { if (!columns.find(item => item.get('id') === 'HOME')) { @@ -103,8 +104,15 @@ export default class GettingStarted extends ImmutablePureComponent { navItems.push(<ColumnLink key='5' icon='users' text={intl.formatMessage(messages.follow_requests)} to='/follow_requests' />); } - navItems = navItems.concat([ - <ColumnLink key='6' icon='ellipsis-h' text={intl.formatMessage(messages.misc)} to='/getting-started-misc' />, + navItems.push(<ColumnLink key='6' icon='ellipsis-h' text={intl.formatMessage(messages.misc)} to='/getting-started-misc' />); + + listItems = listItems.concat([ + <div> + <ColumnLink key='7' icon='bars' text={intl.formatMessage(messages.lists)} to='/lists' /> + {lists.map(list => + <ColumnLink key={list.get('id')} to={`/timelines/list/${list.get('id')}`} icon='list-ul' text={list.get('title')} /> + )} + </div> ]); return ( @@ -114,10 +122,7 @@ export default class GettingStarted extends ImmutablePureComponent { <ColumnSubheading text={intl.formatMessage(messages.navigation_subheading)} /> {navItems} <ColumnSubheading text={intl.formatMessage(messages.lists_subheading)} /> - <ColumnLink key='7' icon='bars' text={intl.formatMessage(messages.lists)} to='/lists' /> - {lists.map(list => - <ColumnLink key={list.get('id')} to={`/timelines/list/${list.get('id')}`} icon='list-ul' text={list.get('title')} /> - )} + {listItems} <ColumnSubheading text={intl.formatMessage(messages.settings_subheading)} /> <ColumnLink icon='cog' text={intl.formatMessage(messages.preferences)} href='/settings/preferences' /> <ColumnLink icon='cogs' text={intl.formatMessage(messages.settings)} onClick={this.openSettings} /> |