实现直播详情页

This commit is contained in:
yuchenglong
2026-01-14 18:15:13 +08:00
parent 8dc87c9b29
commit 025b483099
18 changed files with 2497 additions and 347 deletions

View File

@@ -9,9 +9,10 @@ import { Pressable, StyleSheet, View } from "react-native";
interface MatchCardProps {
match: Match;
onPress?: (match: Match) => void;
}
export function MatchCard({ match }: MatchCardProps) {
export function MatchCard({ match, onPress }: MatchCardProps) {
const router = useRouter();
const { theme } = useTheme();
const isDark = theme === "dark";
@@ -20,7 +21,11 @@ export function MatchCard({ match }: MatchCardProps) {
const borderColor = isDark ? "#38383A" : "#E5E5EA";
const handlePress = () => {
router.push(`/match-detail/${match.id}`);
if (onPress) {
onPress(match);
} else {
router.push(`/match-detail/${match.id}`);
}
};
return (