Skip to content

Commit

Permalink
feat: add event screen with event card
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomasdelecluse committed Sep 10, 2024
1 parent 813e1e8 commit ff378dd
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions apps/expo/src/pages/EventScreen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import React from 'react';
import { View, Text, ImageBackground, StyleSheet, ScrollView } from 'react-native';
import EventCard from "../component/EventCard";
const backgroundImage = require('../../assets/icon.png');
const groupImage = require('../../assets/eventimg.jpg');

const EventScreen = () => {
return (
<ImageBackground source={backgroundImage} style={styles.backgroundImage}>
<View style={styles.overlay}>
<ScrollView
contentContainerStyle={styles.scrollViewContainer}
showsVerticalScrollIndicator={false}
>
<Text style={styles.headerText}>EVENEMENTS</Text>
{/* Génère plusieurs cartes d'événements */}
{Array(7).fill(0).map((_, index) => (
<EventCard
key={index}
city="PARIS"
groupName="TWICE"
imageSource={groupImage}
/>
))}
</ScrollView>
</View>
</ImageBackground>
);
};

const styles = StyleSheet.create({
backgroundImage: {
flex: 1,
resizeMode: 'cover',
},
overlay: {
flex: 1,
},
scrollViewContainer: {
paddingVertical: 25,
paddingHorizontal: 20,
paddingBottom: 120,
},
headerText: {
color: "white",
fontWeight: "bold",
textAlign: "center",
fontSize: 35,
marginBottom: 30,
},
});

export default EventScreen;

0 comments on commit ff378dd

Please sign in to comment.