1- import { useRouter } from "expo-router" ;
2- import { StyleSheet , View } from "react-native" ;
1+ import { Link , useRouter } from "expo-router" ;
2+ import { StyleSheet , useWindowDimensions , View } from "react-native" ;
33
44import { Bookmark } from "./Bookmark" ;
55import { ThemedText , ThemedView } from "./Themed" ;
@@ -23,6 +23,7 @@ type Props = {
2323
2424export function TalkCard ( { session, day, isBookmarked = false } : Props ) {
2525 const shouldUseLocalTz = useReactConfStore ( ( state ) => state . shouldUseLocalTz ) ;
26+ const { width } = useWindowDimensions ( ) ;
2627 const router = useRouter ( ) ;
2728
2829 const gestureTalkTap = useMemo (
@@ -54,23 +55,23 @@ export function TalkCard({ session, day, isBookmarked = false }: Props) {
5455
5556 return (
5657 < Animated . View entering = { FadeIn } exiting = { FadeOut } >
57- < ThemedView style = { styles . container } >
58- { ! isBookmarked && (
59- < ThemedText
60- fontSize = { theme . fontSize14 }
61- fontWeight = "medium"
62- color = { theme . color . textSecondary }
63- marginBottom = { theme . space8 }
64- style = { { marginLeft : theme . space24 } }
58+ < GestureDetector gesture = { gestureTalkTap } >
59+ < ThemedView style = { styles . container } >
60+ { ! isBookmarked && (
61+ < ThemedText
62+ fontSize = { theme . fontSize14 }
63+ fontWeight = "medium"
64+ color = { theme . color . textSecondary }
65+ marginBottom = { theme . space8 }
66+ style = { { marginLeft : theme . space24 } }
67+ >
68+ { formatSessionTime ( session , shouldUseLocalTz ) }
69+ </ ThemedText >
70+ ) }
71+ < ThemedView
72+ color = { theme . color . backgroundSecondary }
73+ style = { styles . content }
6574 >
66- { formatSessionTime ( session , shouldUseLocalTz ) }
67- </ ThemedText >
68- ) }
69- < ThemedView
70- color = { theme . color . backgroundSecondary }
71- style = { styles . content }
72- >
73- < GestureDetector gesture = { gestureTalkTap } >
7475 < View
7576 style = { {
7677 marginHorizontal : - theme . space16 ,
@@ -107,30 +108,41 @@ export function TalkCard({ session, day, isBookmarked = false }: Props) {
107108 </ View >
108109 ) }
109110 </ View >
110- </ GestureDetector >
111- < View style = { styles . bookmarkContainer } >
112- < Bookmark session = { session } size = "small" />
113- </ View >
114- { session . speakers . map ( ( speaker ) => (
115- < GestureDetector
116- gesture = { createSpeakerTapGesture ( speaker ) }
117- key = { speaker . id }
118- >
119- < View
120- style = { {
121- marginHorizontal : - theme . space16 ,
122- paddingHorizontal : theme . space16 ,
123- marginVertical : - theme . space8 ,
124- paddingVertical : theme . space8 ,
125- borderRadius : theme . borderRadius32 ,
126- } }
111+ < View style = { styles . bookmarkContainer } >
112+ < Bookmark session = { session } size = "small" />
113+ </ View >
114+ { session . speakers . map ( ( speaker ) => (
115+ < GestureDetector
116+ key = { speaker . id }
117+ gesture = { createSpeakerTapGesture ( speaker ) }
127118 >
128- < SpeakerDetails speaker = { speaker } />
129- </ View >
130- </ GestureDetector >
131- ) ) }
119+ < Link
120+ href = { {
121+ pathname : "/speaker/[speaker]" ,
122+ params : { speaker : speaker . id } ,
123+ } }
124+ asChild
125+ >
126+ < Link . Trigger >
127+ < View
128+ style = { {
129+ marginHorizontal : - theme . space16 ,
130+ paddingHorizontal : theme . space16 ,
131+ marginVertical : - theme . space8 ,
132+ paddingVertical : theme . space8 ,
133+ borderRadius : theme . borderRadius32 ,
134+ } }
135+ >
136+ < SpeakerDetails speaker = { speaker } />
137+ </ View >
138+ </ Link . Trigger >
139+ < Link . Preview style = { { ...styles . preview , width } } />
140+ </ Link >
141+ </ GestureDetector >
142+ ) ) }
143+ </ ThemedView >
132144 </ ThemedView >
133- </ ThemedView >
145+ </ GestureDetector >
134146 </ Animated . View >
135147 ) ;
136148}
@@ -151,6 +163,9 @@ const styles = StyleSheet.create({
151163 gap : theme . space24 ,
152164 padding : theme . space24 ,
153165 } ,
166+ preview : {
167+ height : 420 ,
168+ } ,
154169 time : {
155170 borderRadius : theme . borderRadius10 ,
156171 flexDirection : "row" ,
0 commit comments