style: added images into header
This commit is contained in:
@@ -10,6 +10,7 @@ export type RawShow = {
|
|||||||
startDate?: string;
|
startDate?: string;
|
||||||
endDate?: string | null;
|
endDate?: string | null;
|
||||||
running: boolean;
|
running: boolean;
|
||||||
|
logoUrl?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Show = {
|
export type Show = {
|
||||||
@@ -23,6 +24,7 @@ export type Show = {
|
|||||||
concept: string;
|
concept: string;
|
||||||
startDate?: string;
|
startDate?: string;
|
||||||
endDate?: string | null;
|
endDate?: string | null;
|
||||||
|
logoUri: string;
|
||||||
running: boolean;
|
running: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -49,6 +51,7 @@ export async function getShows(): Promise<Show[]> {
|
|||||||
streamingService: s.streamingServices,
|
streamingService: s.streamingServices,
|
||||||
concept: s.concept,
|
concept: s.concept,
|
||||||
running: s.running,
|
running: s.running,
|
||||||
|
logoUri: s.logoUrl ?? "",
|
||||||
}));
|
}));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Fetch error:", error);
|
console.error("Fetch error:", error);
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ export default function HomeScreen() {
|
|||||||
concept: show.concept,
|
concept: show.concept,
|
||||||
genres: show.genres,
|
genres: show.genres,
|
||||||
streamingService: show.streamingService,
|
streamingService: show.streamingService,
|
||||||
|
logoUri: show.logoUri,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,15 @@ import * as WebBrowser from "expo-web-browser";
|
|||||||
import styles from "./stackStyles/showDetailStyles";
|
import styles from "./stackStyles/showDetailStyles";
|
||||||
|
|
||||||
export default function ShowDetails() {
|
export default function ShowDetails() {
|
||||||
const { bannerUri, description, concept, genres, streamingService, id } =
|
const {
|
||||||
useLocalSearchParams();
|
bannerUri,
|
||||||
|
description,
|
||||||
|
concept,
|
||||||
|
genres,
|
||||||
|
streamingService,
|
||||||
|
id,
|
||||||
|
logoUri,
|
||||||
|
} = useLocalSearchParams();
|
||||||
const [selectedParticipants, setSelectedParticipants] =
|
const [selectedParticipants, setSelectedParticipants] =
|
||||||
React.useState<boolean>(true);
|
React.useState<boolean>(true);
|
||||||
const [selectedSeason, setSelectedSeason] = React.useState<number>(1);
|
const [selectedSeason, setSelectedSeason] = React.useState<number>(1);
|
||||||
@@ -74,12 +81,6 @@ export default function ShowDetails() {
|
|||||||
paddingBottom: Dimensions.get("window").height * 0.1,
|
paddingBottom: Dimensions.get("window").height * 0.1,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Image
|
|
||||||
source={{
|
|
||||||
uri: "https://images.plus.rtl.de/watch/859291/artwork_square/c3-ni-th-jc/are-you-the-one",
|
|
||||||
}}
|
|
||||||
style={styles.showImage}
|
|
||||||
/>
|
|
||||||
<ShowInfo
|
<ShowInfo
|
||||||
seasons={seasonCount}
|
seasons={seasonCount}
|
||||||
participants={participants.length}
|
participants={participants.length}
|
||||||
|
|||||||
@@ -6,9 +6,11 @@ const styles = StyleSheet.create({
|
|||||||
backgroundColor: "hsl(221, 39%, 12%)",
|
backgroundColor: "hsl(221, 39%, 12%)",
|
||||||
},
|
},
|
||||||
showImage: {
|
showImage: {
|
||||||
width: 150,
|
width: 200,
|
||||||
height: 150,
|
height: 200,
|
||||||
alignSelf: "center",
|
alignSelf: "center",
|
||||||
|
resizeMode: "contain",
|
||||||
|
bottom: 10,
|
||||||
},
|
},
|
||||||
showMainInfoSection: {
|
showMainInfoSection: {
|
||||||
width: "auto",
|
width: "auto",
|
||||||
@@ -37,6 +39,7 @@ const styles = StyleSheet.create({
|
|||||||
alignSelf: "center",
|
alignSelf: "center",
|
||||||
borderTopLeftRadius: 80,
|
borderTopLeftRadius: 80,
|
||||||
borderTopRightRadius: 80,
|
borderTopRightRadius: 80,
|
||||||
|
marginTop: 15,
|
||||||
},
|
},
|
||||||
showBannerLogo: {
|
showBannerLogo: {
|
||||||
width: "100%",
|
width: "100%",
|
||||||
@@ -68,7 +71,7 @@ const styles = StyleSheet.create({
|
|||||||
width: 110,
|
width: 110,
|
||||||
backgroundColor: "hsl(336, 79%, 63%)",
|
backgroundColor: "hsl(336, 79%, 63%)",
|
||||||
borderRadius: 10,
|
borderRadius: 10,
|
||||||
marginTop: 30,
|
marginBottom: 30,
|
||||||
},
|
},
|
||||||
participantSection: {
|
participantSection: {
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ const styles = StyleSheet.create({
|
|||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
bottom: 25,
|
bottom: 15,
|
||||||
},
|
},
|
||||||
showInfoText: {
|
showInfoText: {
|
||||||
color: "hsl(0, 0%, 80%)",
|
color: "hsl(0, 0%, 80%)",
|
||||||
|
|||||||
@@ -5,19 +5,22 @@ import {
|
|||||||
Dimensions,
|
Dimensions,
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
Text,
|
Text,
|
||||||
|
Image,
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
View,
|
View,
|
||||||
} from "react-native";
|
} from "react-native";
|
||||||
|
|
||||||
export default function StackHeader() {
|
export default function StackHeader() {
|
||||||
const { title } = useLocalSearchParams();
|
const { title, logoUri } = useLocalSearchParams();
|
||||||
|
|
||||||
|
const logoUriString = Array.isArray(logoUri) ? logoUri[0] : logoUri;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.header}>
|
<View style={styles.header}>
|
||||||
<TouchableOpacity onPress={() => router.back()}>
|
<TouchableOpacity onPress={() => router.back()}>
|
||||||
<Feather name="arrow-left" size={26} color="white" />
|
<Feather name="arrow-left" size={26} color="white" />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
<Text style={styles.title}>{title}</Text>
|
<Image style={styles.logo} source={{ uri: logoUriString }} />
|
||||||
<TouchableOpacity>
|
<TouchableOpacity>
|
||||||
<Feather name="share" size={26} color="white" />
|
<Feather name="share" size={26} color="white" />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
@@ -27,7 +30,7 @@ export default function StackHeader() {
|
|||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
header: {
|
header: {
|
||||||
height: 125,
|
height: 150,
|
||||||
backgroundColor: "hsl(221, 39%, 12%)",
|
backgroundColor: "hsl(221, 39%, 12%)",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
@@ -46,9 +49,15 @@ const styles = StyleSheet.create({
|
|||||||
shadowRadius: 3.84,
|
shadowRadius: 3.84,
|
||||||
elevation: 5,
|
elevation: 5,
|
||||||
},
|
},
|
||||||
|
logo: {
|
||||||
|
width: 150,
|
||||||
|
height: 125,
|
||||||
|
resizeMode: "contain",
|
||||||
|
marginLeft: 10,
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
color: "white",
|
color: "white",
|
||||||
fontSize: 22,
|
fontSize: 14,
|
||||||
fontWeight: "bold",
|
fontWeight: "bold",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user