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