import React, { useMemo } from "react" import { Card } from "antd" // 使用 CSS-in-JS 方式 import styled, { keyframes } from "styled-components" const rotate = keyframes` 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } ` const breathe = keyframes` 0% { box-shadow: 0 0 5px rgba(37, 231, 232, 0.3); } 50% { box-shadow: 0 0 20px rgba(37, 231, 232, 0.8); } 100% { box-shadow: 0 0 5px rgba(37, 231, 232, 0.3); } ` const CircleElement = styled.div<{ delay: number; playing: boolean }>` position: absolute; width: 300px; height: 160px; background: #3b82f6; // blue-500 opacity: 0.2; border-radius: 50%; top: 55%; left: 50%; animation: ${rotate} 6s linear infinite, ${breathe} 2s infinite alternate; animation-delay: ${(props) => props.delay}s; animation-play-state: ${(props) => (props.playing ? "running" : "paused")}; ` const SuccessIcon = () => { return ( ) } const LoadingIcon = () => { return ( ) } const SearchIcon = () => { return ( ) } export const PlaygroundIodRelevant: React.FC = () => { const { messages, iodLoading, currentMessageId, iodSearch } = useMessageOption() const showDescription = useMemo(() => { return iodSearch && messages.length > 0 && !iodLoading }, [iodSearch, messages, iodLoading]) const data = useMemo(() => { const currentMessage = messages?.find( (message) => message.id === currentMessageId ) return [ { title: (
已连接 11家 国家科学数据中心的 500000+个 科学数据集中
), description: showDescription ? (已发现 {" "} {currentMessage?.iodSources.data.total}个{" "} 数据集
) : ( "" ) }, { title: (已连接 1000000+篇 论文和 50000+个 科创场景
), description: showDescription ? (已发现 {" "} {currentMessage?.iodSources.scenario.total}个{" "} 科创场景
) : ( "" ) }, { title: (已连接 1000+位 智库专家 763家 高校和科研机构和 21000+家 科技企业
), description: showDescription ? (已发现 {" "} {currentMessage?.iodSources.organization.total}个{" "} 科技企业
) : ( "" ) } ] }, [messages, iodLoading]) return (下面是在数联网上进行深度搜索的相关内容
{item.title}
{item.description}