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 { api } from '../utils/api';
|
||||||
import states from '../utils/states';
|
import states from '../utils/states';
|
||||||
|
import { getCurrentAccount } from '../utils/store-utils';
|
||||||
|
|
||||||
import Icon from './icon';
|
import Icon from './icon';
|
||||||
import MenuLink from './MenuLink';
|
import MenuLink from './MenuLink';
|
||||||
|
@ -10,6 +11,7 @@ import MenuLink from './MenuLink';
|
||||||
function NavMenu(props) {
|
function NavMenu(props) {
|
||||||
const snapStates = useSnapshot(states);
|
const snapStates = useSnapshot(states);
|
||||||
const { instance, authenticated } = api();
|
const { instance, authenticated } = api();
|
||||||
|
const currentAccount = getCurrentAccount();
|
||||||
|
|
||||||
// Home = Following
|
// Home = Following
|
||||||
// But when in multi-column mode, Home becomes columns of anything
|
// But when in multi-column mode, Home becomes columns of anything
|
||||||
|
@ -102,6 +104,11 @@ function NavMenu(props) {
|
||||||
{authenticated && (
|
{authenticated && (
|
||||||
<>
|
<>
|
||||||
<MenuDivider />
|
<MenuDivider />
|
||||||
|
{currentAccount?.info?.id && (
|
||||||
|
<MenuLink to={`/${instance}/a/${currentAccount.info.id}`}>
|
||||||
|
<Icon icon="user" size="l" /> <span>Profile</span>
|
||||||
|
</MenuLink>
|
||||||
|
)}
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
states.showAccounts = true;
|
states.showAccounts = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue