:feat google search image

This commit is contained in:
Yordan Simeonov
2025-10-28 08:17:37 +11:00
parent aac4408424
commit 6b39579c75
7 changed files with 167 additions and 195 deletions

View File

@@ -1,13 +1,9 @@
import { Season } from "@/apis/seasonApi";
import { Show } from "@/apis/showApi";
import { useNavigation } from "@react-navigation/native";
import { router } from "expo-router";
import React from "react";
import { Image, StyleSheet, Text, TouchableOpacity, View } from "react-native";
export default function ShowBox({
show,
displayedSeason,
@@ -17,20 +13,24 @@ export default function ShowBox({
displayedSeason?: Season;
shadow?: boolean;
}) {
const navigation = useNavigation();
const goToShow = React.useCallback((id: number) => {
router.push({ pathname: "/showDetails", params: { id: String(id) } });
}, []);
return (
<TouchableOpacity
onPress={() => goToShow(Number(show.id))}
style={
!shadow
? [styles.showContainer, { backgroundColor: "#1b1e2b", paddingBottom: 0 }]
: [styles.showContainer, styles.shadow, { backgroundColor: "#1b1e2b" }]
? [
styles.showContainer,
{ backgroundColor: "#1b1e2b", paddingBottom: 0 },
]
: [
styles.showContainer,
styles.shadow,
{ backgroundColor: "#1b1e2b" },
]
}
>
<View style={styles.showImageContainer}>
@@ -50,8 +50,11 @@ export default function ShowBox({
</Text>
) : null}
<Text style={styles.showDescription} numberOfLines={8} ellipsizeMode="tail">
<Text
style={styles.showDescription}
numberOfLines={8}
ellipsizeMode="tail"
>
{show.description}
</Text>