Set href for menu items with to

merge-requests/459/head
Alex Gleason 2021-03-29 23:26:50 -05:00
rodzic db201707bf
commit 32b3173604
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -140,12 +140,12 @@ class DropdownMenu extends React.PureComponent {
return <li key={`sep-${i}`} className='dropdown-menu__separator' />;
}
const { text, href = '#', newTab, isLogout } = option;
const { text, href, to, newTab, isLogout } = option;
return (
<li className='dropdown-menu__item' key={`${text}-${i}`}>
<a
href={href}
href={href || to || '#'}
role='button'
tabIndex='0'
ref={i === 0 ? this.setFocusRef : null}

Wyświetl plik

@ -103,7 +103,7 @@ class ProfileDropdown extends React.PureComponent {
let menu = [];
menu.push({ text: this.renderAccount(account), to: `/@${account.get('acct')}`, href: '/', middleClick: this.handleMiddleClick(account) });
menu.push({ text: this.renderAccount(account), to: `/@${account.get('acct')}` });
otherAccounts.forEach(account => {
menu.push({ text: this.renderAccount(account), action: this.handleSwitchAccount(account), href: '/', middleClick: this.handleMiddleClick(account) });