Unverified Commit 039b6b24 authored by boojack's avatar boojack Committed by GitHub

chore: remove username click event (#1167)

chore: remove user name click event
parent a09b2c4e
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 = () => {
<Dropdown
className="w-full"
trigger={
<div
className="px-2 py-1 max-w-full flex flex-row justify-start items-center cursor-pointer rounded hover:shadow hover:bg-white dark:hover:bg-zinc-700"
onClick={handleUsernameClick}
>
<div className="px-2 py-1 max-w-full flex flex-row justify-start items-center cursor-pointer rounded hover:shadow hover:bg-white dark:hover:bg-zinc-700">
<UserAvatar avatarUrl={user?.avatarUrl} />
<span className="px-1 text-lg font-medium text-slate-800 dark:text-gray-200 shrink truncate">{username}</span>
{!isVisitorMode && user?.role === "HOST" ? (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment