feat: add ability to change password
This commit is contained in:
@@ -3,6 +3,7 @@ import { useSession } from "./Session";
|
||||
import { User } from "./api";
|
||||
import { useTheme } from "./ThemeProvider";
|
||||
import { colourTheme, darkTheme, normalTheme, rainbowTheme } from "./themes";
|
||||
import { useNavigate } from "react-router";
|
||||
|
||||
interface ContextMenuItem {
|
||||
label: string;
|
||||
@@ -35,6 +36,7 @@ const UserInfo = (user: User) => {
|
||||
export default function Avatar() {
|
||||
const { user, onLogout } = useSession();
|
||||
const { theme, setTheme } = useTheme();
|
||||
const navigate = useNavigate();
|
||||
const [contextMenu, setContextMenu] = useState<{
|
||||
open: boolean;
|
||||
allowOpen: boolean;
|
||||
@@ -46,6 +48,7 @@ export default function Avatar() {
|
||||
|
||||
const contextMenuItems: ContextMenuItem[] = [
|
||||
{ label: "view Profile", onClick: handleViewProfile },
|
||||
{ label: "change password", onClick: () => navigate("/changepassword") },
|
||||
{
|
||||
label: "change theme",
|
||||
onClick: () => {
|
||||
|
||||
Reference in New Issue
Block a user