From 1793c10b45ab488dc86e4d458435f1c079c032fd Mon Sep 17 00:00:00 2001 From: kyuuseiryuu Date: Wed, 18 Mar 2026 01:30:23 +0900 Subject: [PATCH] feat(components): add navigation to profile on UID click - Modified `BindKaiqiuAccount` to wrap the UID text in a clickable `Flex` component. - Added an `ExportOutlined` icon to indicate the actionable link. - Implemented navigation to `/profile/{uid}` when the UID section is clicked, utilizing the `useNavigate` hook. - Imported the new icon and navigation hook to support this interaction. --- src/components/BindKaiqiuAccount.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/BindKaiqiuAccount.tsx b/src/components/BindKaiqiuAccount.tsx index f29ffe3..e6e042d 100644 --- a/src/components/BindKaiqiuAccount.tsx +++ b/src/components/BindKaiqiuAccount.tsx @@ -1,8 +1,9 @@ import { useRequest } from "ahooks"; import { useAuthHeaders } from "../hooks/useAuthHeaders"; import { Alert, App, Button, Drawer, Flex, Form, Input, Spin, Typography } from "antd"; -import { LinkOutlined } from "@ant-design/icons"; +import { ExportOutlined, LinkOutlined } from "@ant-design/icons"; import { useCallback, useState } from "react"; +import { useNavigate } from "react-router"; export const BindKaiqiuAccount = () => { const headers = useAuthHeaders(); @@ -44,10 +45,14 @@ export const BindKaiqiuAccount = () => { ), }); }, [modal]); + const navigate = useNavigate(); if (isBindReq.data?.isBinded === undefined) return null; if (isBindReq.data?.isBinded) { return ( - UID: {isBindReq.data?.uid ?? '-'} + navigate(`/profile/${isBindReq.data?.uid}`)}> + UID: {isBindReq.data?.uid ?? '-'} + + ); } return (