Browse Source

Merge branch 'feature/93-add-menu-overflow-button' into 'implement-ui'

feat: add dropdown to menu, move clear databases into dropdown

See merge request ecentrics/concordia!6
develop
Apostolos Fanakis 4 years ago
parent
commit
cd92a346d4
  1. 22
      packages/concordia-app/src/layouts/MainLayout/MainLayoutMenu/index.jsx

22
packages/concordia-app/src/layouts/MainLayout/MainLayoutMenu/index.jsx

@ -1,5 +1,5 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { Menu } from 'semantic-ui-react'; import { Dropdown, Menu } from 'semantic-ui-react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useHistory } from 'react-router'; import { useHistory } from 'react-router';
import { useSelector } from 'react-redux'; import { useSelector } from 'react-redux';
@ -39,14 +39,6 @@ const MainLayoutMenu = () => {
> >
<img src={appLogo} alt="app_logo" /> <img src={appLogo} alt="app_logo" />
</Menu.Item> </Menu.Item>
<Menu.Item
link
name="clear-databases"
key="clear-databases"
onClick={handleClearDatabasesClick}
>
{t('topbar.button.clear.databases')}
</Menu.Item>
<Menu.Menu position="right"> <Menu.Menu position="right">
{hasSignedUp && history.location.pathname === '/home' && ( {hasSignedUp && history.location.pathname === '/home' && (
<Menu.Item <Menu.Item
@ -81,6 +73,18 @@ const MainLayoutMenu = () => {
</Menu.Item> </Menu.Item>
)} )}
</Menu.Menu> </Menu.Menu>
<Dropdown key="overflow" item direction="left">
<Dropdown.Menu>
<Dropdown.Item
link
name="clear-databases"
key="clear-databases"
onClick={handleClearDatabasesClick}
>
{t('topbar.button.clear.databases')}
</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
<ClearDatabasesModal <ClearDatabasesModal
open={isClearDatabasesOpen} open={isClearDatabasesOpen}

Loading…
Cancel
Save