feat: fixes

This commit is contained in:
2025-12-03 16:52:04 +01:00
parent 74e02fef79
commit cc7782ae4e
4 changed files with 10 additions and 39 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 777 KiB

+2 -1
View File
@@ -104,7 +104,7 @@ import placeholder2 from "./UI/placeholder2.jpg";
import placeholder3 from "./UI/placeholder3.png";
import placeholder4 from "./UI/placeholder4.jpg";
import profile from "./UI/profile.jpg";
import musiclandClub from "./UI/musiclandClub.png";
export const tabs = {
home,
tasks,
@@ -237,6 +237,7 @@ export const img = {
placeholder4,
profile,
goodVibe,
musiclandClub,
};
export const cardsImg = {
-2
View File
@@ -575,9 +575,7 @@ const Home = ({ navigation, route }) => {
{stageCardsList}
<ClubCard
image={icons.clubIcon}
onPress={handleClubPress}
hasActiveSubscription={hasActiveSubscription}
/>
</>
);
+8 -36
View File
@@ -1,60 +1,32 @@
import React, { memo, useEffect } from "react";
import { Pressable, StyleSheet, View } from "react-native";
import { useVideoPlayer, VideoView } from "expo-video";
import { videos } from "../../../assets";
import { Image, Pressable, StyleSheet, View } from "react-native";
import { isWeb } from "../../../hooks/useLayoutType.js";
import { img } from "../../../assets/index.js";
const ClubCard = ({ onPress }) => {
const player = useVideoPlayer(videos.club, (player) => {
player.loop = true;
player.muted = true;
player.play();
});
useEffect(() => {
if (player) {
player.muted = true;
player.loop = true;
player.play();
}
}, [player]);
return (
<Pressable
onPress={onPress}
style={({ pressed }) => [styles.card, pressed && styles.cardPressed]}
>
<View style={styles.inner}>
<VideoView
player={player}
style={styles.video}
contentFit="cover"
nativeControls={false}
/>
</View>
<Image source={img.musiclandClub} style={styles.image} />
</Pressable>
);
};
export default memo(ClubCard);
export default ClubCard;
const styles = StyleSheet.create({
card: {
marginTop: isWeb ? 16 : 28,
backgroundColor: "#252438",
overflow: "hidden",
width: 200,
height: 120, // Added fixed height to ensure video visibility, adjusting based on previous content size estimation
alignSelf: "center",
},
cardPressed: {
opacity: 0.85,
},
inner: {
flex: 1,
},
video: {
width: "100%",
height: "100%",
image: {
width: 210,
height: 120,
resizeMode: "contain",
},
});