import React, { useEffect, useState } from "react"; import { BOT_INFO_URL } from "../../constants/api.js"; export function BotItem() { const [user, setUser] = useState(null); const [isLoading, setIsLoading] = useState(false); const fetchBotInfo = async () => { setIsLoading(true); try { const response = await fetch(BOT_INFO_URL); const data = await response.json(); setUser(data); } catch (error) { console.error("获取机器人信息失败:", error); } finally { setIsLoading(false); } }; useEffect(() => { fetchBotInfo(); }, []); return (