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.
This commit is contained in:
kyuuseiryuu 2026-03-18 01:30:23 +09:00
parent c70aeda412
commit 1793c10b45

View File

@ -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 (
<Typography.Text type="secondary">UID: {isBindReq.data?.uid ?? '-'}</Typography.Text>
<Flex gap={8} onClick={() => navigate(`/profile/${isBindReq.data?.uid}`)}>
<Typography.Text type="secondary">UID: {isBindReq.data?.uid ?? '-'}</Typography.Text>
<ExportOutlined />
</Flex>
);
}
return (