Email Edit
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Menu, MenuItem } from '@mui/material';
|
||||
import { useNavigate, useRouter } from '@tanstack/react-router';
|
||||
import { useMatch, useNavigate, useRouter } from '@tanstack/react-router';
|
||||
import { t } from 'i18next';
|
||||
import { FC } from 'react';
|
||||
import Api from '../../../api/Api';
|
||||
@@ -14,6 +14,7 @@ interface Props {
|
||||
const UserMenu: FC<Props> = ({ anchorEl, handleClose }) => {
|
||||
const navigate = useNavigate();
|
||||
const router = useRouter();
|
||||
const match = useMatch({ from: '/profile/', strict: true, shouldThrow: false });
|
||||
|
||||
const user = Api.getAuthenticatedUser();
|
||||
|
||||
@@ -40,6 +41,7 @@ const UserMenu: FC<Props> = ({ anchorEl, handleClose }) => {
|
||||
{user ? (
|
||||
[
|
||||
<MenuItem
|
||||
selected={!!match}
|
||||
key="profile"
|
||||
onClick={() => {
|
||||
navigate({ to: ROUTES.PROFILE });
|
||||
|
||||
Reference in New Issue
Block a user