This commit is contained in:
eric
2026-03-18 02:08:44 -05:00
parent 6873bd8f70
commit 5b26c3c907
2 changed files with 2 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ function getMockForSession(sessionId: string) {
function AvatarItem({ joiner }: { joiner: { name?: string; nickname?: string; avatar?: string; xiaohongshu_url?: string } }) {
const [imgError, setImgError] = useState(false);
const nickname = "name" in joiner ? joiner.name : joiner.nickname ?? "";
const nickname = ("name" in joiner ? joiner.name : joiner.nickname) ?? "";
const avatar = joiner.avatar;
const xhUrl = joiner.xiaohongshu_url;
const showAvatar = avatar && avatar.length > 0 && !imgError;

View File

@@ -6,7 +6,7 @@ const CLICK_THRESHOLD = 5;
/** 连续点击 5 次打开小红书主页 */
export function useXhClickOpener(xhUrl: string | undefined) {
const countRef = useRef(0);
const timerRef = useRef<ReturnType<typeof setTimeout>>();
const timerRef = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);
return useCallback(
(e: React.MouseEvent) => {