import React, { useMemo } from "react"; import { formatTimestamp, goToPage } from "@/utils/tools"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faAngleRight } from "@fortawesome/free-solid-svg-icons"; import { useRouter } from "next/navigation"; export default function NoticeItem({ navigation, leftIcon, hasLink, data }) { const router = useRouter(); const currentLink = useMemo(() => { if (hasLink && data?.hyperlinks) { const hasAppLink = data.hyperlinks.filter( (it) => it.action === "app_router_path" )[0]; return hasAppLink ?? null; } }, [data]); return (
{data?.title}
{data?.message}
{/* 链接跳转 */} {!!data?.link_text && (