mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-24 16:58:47 +01:00
Show Profile link in menu
Because I need this
This commit is contained in:
parent
0467dc7c09
commit
beca8ed01f
1 changed files with 7 additions and 0 deletions
|
@ -3,6 +3,7 @@ import { useSnapshot } from 'valtio';
|
|||
|
||||
import { api } from '../utils/api';
|
||||
import states from '../utils/states';
|
||||
import { getCurrentAccount } from '../utils/store-utils';
|
||||
|
||||
import Icon from './icon';
|
||||
import MenuLink from './MenuLink';
|
||||
|
@ -10,6 +11,7 @@ import MenuLink from './MenuLink';
|
|||
function NavMenu(props) {
|
||||
const snapStates = useSnapshot(states);
|
||||
const { instance, authenticated } = api();
|
||||
const currentAccount = getCurrentAccount();
|
||||
|
||||
// Home = Following
|
||||
// But when in multi-column mode, Home becomes columns of anything
|
||||
|
@ -102,6 +104,11 @@ function NavMenu(props) {
|
|||
{authenticated && (
|
||||
<>
|
||||
<MenuDivider />
|
||||
{currentAccount?.info?.id && (
|
||||
<MenuLink to={`/${instance}/a/${currentAccount.info.id}`}>
|
||||
<Icon icon="user" size="l" /> <span>Profile</span>
|
||||
</MenuLink>
|
||||
)}
|
||||
<MenuItem
|
||||
onClick={() => {
|
||||
states.showAccounts = true;
|
||||
|
|
Loading…
Reference in a new issue