kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Set href for menu items with to
rodzic
db201707bf
commit
32b3173604
|
@ -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}
|
||||
|
|
|
@ -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) });
|
||||
|
|
Ładowanie…
Reference in New Issue