's'
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user