style: added new screens and designs

This commit is contained in:
Cron1cle
2025-10-06 01:16:10 +02:00
parent badf355a2d
commit 8fb418c6f3
12 changed files with 718 additions and 141 deletions

View File

@@ -1,16 +1,42 @@
import styles from "@/app/styles/indexStyles";
import styles from "@/app/tabStyles/indexStyles";
import ShowCard from "@/components/ui/ShowCard";
import { useShowContext } from "@/contexts/ShowContext";
import { router } from "expo-router";
import React from "react";
import { Text, View } from "react-native";
import { ActivityIndicator, Text, View } from "react-native";
import {
GestureHandlerRootView,
ScrollView,
} from "react-native-gesture-handler";
export default function HomeScreen() {
const { shows } = useShowContext();
const { shows, error, loading } = useShowContext();
if (loading) {
return (
<View
style={[
styles.mainContainer,
{ justifyContent: "center", alignItems: "center" },
]}
>
<ActivityIndicator size="large" color="#ffffff" />
</View>
);
}
if (error) {
return (
<View
style={[
styles.mainContainer,
{ justifyContent: "center", alignItems: "center" },
]}
>
<Text>Error: {error}</Text>
</View>
);
}
return (
<GestureHandlerRootView>
@@ -20,12 +46,25 @@ export default function HomeScreen() {
</View>
<ScrollView contentContainerStyle={{ paddingBottom: 30 }}>
{shows.map((show) => {
const showLiveBadge = show.endDate === null;
const showLiveBadge = show.running;
return (
<ShowCard
key={show.id}
onPress={() => router.push("/showDetails")}
imageUri={show.bannerUri || show.thumbnailUri}
title={show.title}
onPress={() =>
router.push({
pathname: "/showDetails",
params: {
title: show.title,
bannerUri: show.bannerUri,
description: show.description,
concept: show.concept,
genres: show.genres,
streamingService: show.streamingService,
},
})
}
imageUri={show.bannerUri}
streamingServiceUri={show.streamingService}
genres={show.genres}
{...(showLiveBadge