Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/(tabs)/Event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export default function EventScreen() {
index={index}
onPress={handleEventPress}
handleSave={handleSave}
saved={savedEventIds.has(item.eventId)}
/>
);

Expand Down Expand Up @@ -183,7 +184,7 @@ export default function EventScreen() {
)}
<SafeAreaView style={styles.background}>
{renderContent()}
{selectedEvent && <EventDetailModal visible={modalVisible} event={selectedEvent} onClose={() => setModalVisible(false)} handleSave={handleSave} />}
{selectedEvent && <EventDetailModal visible={modalVisible} event={selectedEvent} onClose={() => setModalVisible(false)} handleSave={handleSave} saved={savedEventIds.has(selectedEvent.eventId)} />}

</SafeAreaView>
</SafeAreaView>
Expand Down
Binary file removed assets/event/Bookmark.png
Binary file not shown.
20 changes: 20 additions & 0 deletions assets/event/Bookmark.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import * as React from "react";
import Svg, { G, Path } from "react-native-svg";

const Bookmark = ({ fill = "#ff0000", width = 24, height = 24 }) => (
<Svg
width={width}
height={height}
viewBox="-15 -15 60 60"
fill="none"
>
<G transform="translate(-417.000000, -151.000000)">
<Path
d="M437,177 C437,178.104 436.104,179 435,179 L428,172 L421,179 C419.896,179 419,178.104 419,177 L419,155 C419,153.896 419.896,153 421,153 L435,153 C436.104,153 437,153.896 437,155 L437,177 L437,177 Z M435,151 L421,151 C418.791,151 417,152.791 417,155 L417,177 C417,179.209 418.791,181 421,181 L428,174 L435,181 C437.209,181 439,179.209 439,177 L439,155 C439,152.791 437.209,151 435,151 L435,151 Z"
fill={fill}
/>
</G>
</Svg>
);

export default Bookmark;
7 changes: 7 additions & 0 deletions assets/event/NotSaved.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions assets/event/Saved.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 17 additions & 19 deletions components/eventScreen/EventCard.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { View, Text, StyleSheet, Pressable, Image, TouchableOpacity } from 'react-native';
import { useState } from 'react';
import { View, Text, StyleSheet, Pressable, TouchableOpacity } from 'react-native';
import NotSaved from "../../assets/event/NotSaved.svg"
import Saved from "../../assets/event/Saved.svg"
import { Event } from '../../types';

interface EventCardProps {
event: Event;
index: number;
onPress: (event: Event) => void;
handleSave: (eventId: string) => void;
saved: boolean;
}

const formatTime = (timestamp: number): string => {
Expand All @@ -17,17 +21,11 @@ const formatTime = (timestamp: number): string => {
});
};

const formatDate = (timestamp: number): string => {
const date = new Date(timestamp * 1000);
return date.toLocaleDateString('en-US', {
month: 'short',
day: 'numeric'
});
};

export function EventCard({ event, index, onPress, handleSave }: EventCardProps) {
export function EventCard({ event, index, onPress, handleSave, saved }: EventCardProps) {
const handlePress = () => onPress(event);
const handleSavePress = () => handleSave(event.eventId);
const handleSavePress = () => {
handleSave(event.eventId);
}
{/*When actual design is sent out create actual press animations*/}
return (

Expand All @@ -40,10 +38,14 @@ export function EventCard({ event, index, onPress, handleSave }: EventCardProps)
>
<View style={styles.header}>
<Text style={styles.title}>{event.name}</Text>
<TouchableOpacity onPress={handleSavePress}>
{/* Once png is converted to svg we can add fill to red on click */}
<Image style={styles.date} source={require('../../assets/event/Bookmark.png')}/>
</TouchableOpacity>
<TouchableOpacity onPress={handleSavePress}>
{saved ? (
<Saved width={22} height={22} />
) : (
<NotSaved width={22} height={22} />
)}
</TouchableOpacity>

</View>
<Text style={styles.time}>
{formatTime(event.startTime)} - {formatTime(event.endTime)}
Expand Down Expand Up @@ -87,10 +89,6 @@ const styles = StyleSheet.create({
flexWrap: 'wrap',
width: 200
},
date: {
tintColor: '#ff0000ff',
},

time: {
fontSize: 14,
color: '#444',
Expand Down
71 changes: 45 additions & 26 deletions components/eventScreen/EventDetailModal.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import { View, Text, StyleSheet, TouchableOpacity, Modal, Image, ScrollView } from 'react-native';
import { useState } from 'react';
import { Text, StyleSheet, TouchableOpacity, Modal, Image, ScrollView, View, Platform } from 'react-native';
import { Event } from '../../types';
import { SafeAreaView } from 'react-native-safe-area-context';
import Saved from "../../assets/event/Saved.svg";
import NotSaved from "../../assets/event/NotSaved.svg";
import { useSafeAreaInsets } from 'react-native-safe-area-context';

interface FullScreenModalProps {
visible: boolean;
event: Event;
onClose: () => void;
handleSave: (eventId: string) => void;
saved: boolean;
}

const formatTime = (timestamp: number): string => {
Expand All @@ -18,8 +22,14 @@ const formatTime = (timestamp: number): string => {
});
};

export default function FullScreenModal({ visible, event, onClose, handleSave }: FullScreenModalProps) {
const handlePressSave = () => handleSave(event.eventId);
export default function FullScreenModal({ visible, event, onClose, handleSave, saved }: FullScreenModalProps) {
const insets = useSafeAreaInsets(); // ✅ ensures proper padding even inside Modal

const handlePressSave = () => {
console.log(saved);
handleSave(event.eventId);
};

return (
<Modal
visible={visible}
Expand All @@ -28,23 +38,38 @@ export default function FullScreenModal({ visible, event, onClose, handleSave }:
statusBarTranslucent
onRequestClose={onClose}
>
<SafeAreaView style={styles.overlay}>


<View
style={[
styles.overlay,
{
paddingTop: insets.top || (Platform.OS === 'android' ? 20 : 0),
paddingBottom: insets.bottom || 0,
},
]}
>
<ScrollView
contentContainerStyle={styles.scrollContent}
showsVerticalScrollIndicator={false}
>
<TouchableOpacity onPress={onClose} style={styles.closeButton}>
<Text style={styles.closeText}>X</Text>
</TouchableOpacity>

<TouchableOpacity onPress={handlePressSave} style={styles.saveButton}>
<Image source={require('../../assets/event/Bookmark.png')} />
{saved ? (
<Saved width={22} height={22} />
) : (
<NotSaved width={22} height={22} />
)}
</TouchableOpacity>

<Text style={styles.title}>{event?.name}</Text>
<Text style={styles.body}>{formatTime(event?.startTime)} - {formatTime(event?.endTime)}.</Text>
<Text style={styles.body}>
{formatTime(event?.startTime)} - {formatTime(event?.endTime)}.
</Text>
{event?.sponsor && <Text style={styles.body}>{event?.sponsor}</Text>}
<Text style={styles.body}>{event?.locations[0]?.description || 'TBA'}</Text>

{event?.mapImageUrl && event.mapImageUrl.trim() !== '' && (
<Image
source={{ uri: event.mapImageUrl }}
Expand All @@ -54,21 +79,20 @@ export default function FullScreenModal({ visible, event, onClose, handleSave }:
)}
<Text style={styles.body}>{event?.description?.trim()}</Text>
</ScrollView>
</SafeAreaView>
</View>
</Modal>
);
}


const styles = StyleSheet.create({
overlay: {
flex: 1,
backgroundColor: '#1a0033',
paddingTop: 20,
paddingHorizontal: 10,
},
scrollContent: {
paddingHorizontal: 25,
paddingTop: 60,
paddingTop: 60,
alignItems: 'flex-start',
paddingBottom: 40,
},
Expand All @@ -89,11 +113,6 @@ const styles = StyleSheet.create({
fontWeight: 'bold',
color: '#fff',
},
content: {
alignItems: 'flex-start',
paddingHorizontal: 30,
top: 80,
},
title: {
fontSize: 22,
fontWeight: '600',
Expand All @@ -104,17 +123,17 @@ const styles = StyleSheet.create({
fontSize: 16,
color: '#ccc',
textAlign: 'left',
marginBottom:10
marginBottom: 10,
},
map: {
width: 300,
width: 300,
height: 300,
backgroundColor: "#FFFFFF",
marginBottom: 15
backgroundColor: '#FFFFFF',
marginBottom: 15,
},
container: {
borderColor: "#6b3982ff",
borderRadius: 10,
borderWidth: 7,
}
borderColor: "#6b3982ff",
borderRadius: 10,
borderWidth: 7,
},
});
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/components/onboarding/ScreenFive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const styles = StyleSheet.create({
textAlign: "center",
fontSize: 16,
color: "#000000",
lineHeight: 13,
lineHeight: 15,
letterSpacing: 0
},
skipButton: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/onboarding/ScreenFour.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const styles = StyleSheet.create({
textAlign: "center",
fontSize: 16,
color: "#000000",
lineHeight: 13,
lineHeight: 15,
letterSpacing: 0
},
skipButton: {
Expand Down
1 change: 1 addition & 0 deletions src/components/onboarding/ScreenOne.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default function ScreenOne() {

const styles = StyleSheet.create({
background: {
height: '100%',
backgroundColor: '#FFFFFF'
},
logoTop: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/onboarding/ScreenSeven.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const styles = StyleSheet.create({
textAlign: "center",
fontSize: 16,
color: "#000000",
lineHeight: 13,
lineHeight: 15,
letterSpacing: 0
},
});
Expand Down
2 changes: 1 addition & 1 deletion src/components/onboarding/ScreenSix.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const styles = StyleSheet.create({
textAlign: "center",
fontSize: 16,
color: "#000000",
lineHeight: 13,
lineHeight: 15,
letterSpacing: 0
},
skipButton: {
Expand Down
4 changes: 2 additions & 2 deletions src/components/onboarding/ScreenThree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ const styles = StyleSheet.create({
textAlign: "center",
fontSize: 16,
color: "#000000",
lineHeight: 13,
letterSpacing: 0
lineHeight: 15,
letterSpacing: 0,
},
skipButton: {
marginTop: 5,
Expand Down