update pay ui

This commit is contained in:
2025-12-17 18:35:15 +08:00
parent dbd4cb39ec
commit 2d5d3b3342

View File

@@ -2,6 +2,7 @@
// 新闻动态 Tab - 相关新闻事件列表 + 分页
import React from "react";
import { useNavigate } from "react-router-dom";
import {
Box,
VStack,
@@ -35,6 +36,7 @@ import {
FaChevronLeft,
FaChevronRight,
} from "react-icons/fa";
import { getEventDetailUrl } from "@/utils/idEncoder";
// 黑金主题配色
const THEME_PRESETS = {
@@ -120,9 +122,18 @@ const NewsEventsTab = ({
cardBg,
themePreset = "default",
}) => {
const navigate = useNavigate();
// 获取主题配色
const theme = THEME_PRESETS[themePreset] || THEME_PRESETS.default;
const isBlackGold = themePreset === "blackGold";
// 点击事件卡片,跳转到详情页
const handleEventClick = (eventId) => {
if (eventId) {
navigate(getEventDetailUrl(eventId));
}
};
// 事件类型图标映射
const getEventTypeIcon = (eventType) => {
const iconMap = {
@@ -312,6 +323,8 @@ const NewsEventsTab = ({
variant="outline"
bg={theme.cardBg}
borderColor={theme.cardBorder}
cursor="pointer"
onClick={() => handleEventClick(event.id)}
_hover={{
bg: theme.cardHoverBg,
shadow: "md",