Add events to sidebar
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
403bcba525
commit
0481e528af
2 changed files with 19 additions and 0 deletions
|
@ -34,6 +34,7 @@ const messages = defineMessages({
|
|||
logout: { id: 'navigation_bar.logout', defaultMessage: 'Logout' },
|
||||
bookmarks: { id: 'column.bookmarks', defaultMessage: 'Bookmarks' },
|
||||
lists: { id: 'column.lists', defaultMessage: 'Lists' },
|
||||
events: { id: 'column.events', defaultMessage: 'Events' },
|
||||
invites: { id: 'navigation_bar.invites', defaultMessage: 'Invites' },
|
||||
developers: { id: 'navigation.developers', defaultMessage: 'Developers' },
|
||||
addAccount: { id: 'profile_dropdown.add_account', defaultMessage: 'Add an existing account' },
|
||||
|
@ -208,6 +209,15 @@ const SidebarMenu: React.FC = (): JSX.Element | null => {
|
|||
/>
|
||||
)}
|
||||
|
||||
{features.events && (
|
||||
<SidebarLink
|
||||
to='/events'
|
||||
icon={require('@tabler/icons/calendar-event.svg')}
|
||||
text={intl.formatMessage(messages.events)}
|
||||
onClick={onClose}
|
||||
/>
|
||||
)}
|
||||
|
||||
{settings.get('isDeveloper') && (
|
||||
<SidebarLink
|
||||
to='/developers'
|
||||
|
|
|
@ -13,6 +13,7 @@ const messages = defineMessages({
|
|||
follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' },
|
||||
bookmarks: { id: 'column.bookmarks', defaultMessage: 'Bookmarks' },
|
||||
lists: { id: 'column.lists', defaultMessage: 'Lists' },
|
||||
events: { id: 'column.events', defaultMessage: 'Events' },
|
||||
developers: { id: 'navigation.developers', defaultMessage: 'Developers' },
|
||||
});
|
||||
|
||||
|
@ -57,6 +58,14 @@ const SidebarNavigation = () => {
|
|||
});
|
||||
}
|
||||
|
||||
if (features.events) {
|
||||
menu.push({
|
||||
to: '/events',
|
||||
text: intl.formatMessage(messages.events),
|
||||
icon: require('@tabler/icons/calendar-event.svg'),
|
||||
});
|
||||
}
|
||||
|
||||
if (settings.get('isDeveloper')) {
|
||||
menu.push({
|
||||
to: '/developers',
|
||||
|
|
Loading…
Reference in a new issue