final: added personHistory
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user