final: added personHistory

This commit is contained in:
Cron1cle
2025-10-23 03:17:46 +02:00
parent 73d883ae29
commit d40b90de41
7 changed files with 603 additions and 97 deletions

View File

@@ -4,7 +4,6 @@ import StackHeader from "@/components/ui/StackHeader";
import { useSeasonContext } from "@/contexts/SeasonContext";
import { router, useLocalSearchParams } from "expo-router";
import React from "react";
import {
Dimensions,
Image,
@@ -99,6 +98,21 @@ export default function ShowDetails() {
});
}, [startDate]);
const handleOpenParticipant = React.useCallback(
(p: { id: number; name: string }) => {
router.push({
pathname: "/participant",
params: {
participantId: p.id,
name: p.name,
originShowId: String(showId),
originSeason: String(selectedSeason),
},
});
},
[showId, selectedSeason]
);
return (
<View style={styles.mainContainer}>
<StackHeader />
@@ -210,23 +224,11 @@ export default function ShowDetails() {
styles.participantContainer,
{ backgroundColor: "hsl(336, 79%, 63%)" },
]}
onPress={() =>
router.push({
pathname: "/participant",
params: {
participantId: p.id,
name: p.name,
},
})
}
onPress={() => handleOpenParticipant(p)}
>
<Image
source={{ uri: p.imageUri }}
style={{
width: "100%",
height: "100%",
borderRadius: 10,
}}
style={{ width: "100%", height: "100%", borderRadius: 10 }}
resizeMode="cover"
blurRadius={p.imageUri.includes("pravatar") ? 16 : 0}
/>