From 039b6b247ab83752403015b580745e251a9133d3 Mon Sep 17 00:00:00 2001 From: boojack Date: Sun, 26 Feb 2023 23:52:51 +0800 Subject: [PATCH] chore: remove username click event (#1167) chore: remove user name click event --- web/src/components/UserBanner.tsx | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/web/src/components/UserBanner.tsx b/web/src/components/UserBanner.tsx index c4fd83c48..9029be7b3 100644 --- a/web/src/components/UserBanner.tsx +++ b/web/src/components/UserBanner.tsx @@ -1,6 +1,6 @@ -import { useCallback, useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import { useLocationStore, useMemoStore, useTagStore, useUserStore } from "../store/module"; +import { useMemoStore, useTagStore, useUserStore } from "../store/module"; import { getMemoStats } from "../helpers/api"; import * as utils from "../helpers/utils"; import Dropdown from "./common/Dropdown"; @@ -10,7 +10,6 @@ import UserAvatar from "./UserAvatar"; const UserBanner = () => { const { t } = useTranslation(); - const locationStore = useLocationStore(); const userStore = useUserStore(); const memoStore = useMemoStore(); const tagStore = useTagStore(); @@ -45,10 +44,6 @@ const UserBanner = () => { }); }, [memos]); - const handleUsernameClick = useCallback(() => { - locationStore.clearQuery(); - }, []); - const handleArchivedBtnClick = () => { showArchivedMemoDialog(); }; @@ -68,10 +63,7 @@ const UserBanner = () => { +
{username} {!isVisitorMode && user?.role === "HOST" ? (