diff --git a/.expo/README.md b/.expo/README.md new file mode 100644 index 000000000..fd146b4d3 --- /dev/null +++ b/.expo/README.md @@ -0,0 +1,15 @@ +> Why do I have a folder named ".expo" in my project? + +The ".expo" folder is created when an Expo project is started using "expo start" command. + +> What do the files contain? + +- "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds. +- "packager-info.json": contains port numbers and process PIDs that are used to serve the application to the mobile device/simulator. +- "settings.json": contains the server configuration that is used to serve the application manifest. + +> Should I commit the ".expo" folder? + +No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine. + +Upon project creation, the ".expo" folder is already added to your ".gitignore" file. diff --git a/.expo/settings.json b/.expo/settings.json new file mode 100644 index 000000000..90d7636a8 --- /dev/null +++ b/.expo/settings.json @@ -0,0 +1,9 @@ +{ + "hostType": "lan", + "lanType": "ip", + "devClient": true, + "dev": true, + "minify": false, + "urlRandomness": null, + "https": false +} diff --git a/frontend/sac-mobile/app/(calendar)/_layout.tsx b/frontend/sac-mobile/app/(calendar)/_layout.tsx index bc5bdbd1c..70c74ab12 100644 --- a/frontend/sac-mobile/app/(calendar)/_layout.tsx +++ b/frontend/sac-mobile/app/(calendar)/_layout.tsx @@ -9,6 +9,7 @@ import { Theme } from 'react-native-calendars/src/types'; import Agenda from './components/agenda'; +import { getMarkedDates } from './components/mock'; // FIXME FIXME FIXME FIXME: everything needs to be redone/checked spacing-wise. lots of errors @@ -35,7 +36,7 @@ const CalendarView = () => { Events - + diff --git a/frontend/sac-mobile/app/(calendar)/components/agenda.tsx b/frontend/sac-mobile/app/(calendar)/components/agenda.tsx index 3114d2a80..db443f2b3 100644 --- a/frontend/sac-mobile/app/(calendar)/components/agenda.tsx +++ b/frontend/sac-mobile/app/(calendar)/components/agenda.tsx @@ -1,111 +1,11 @@ import React, { useCallback } from 'react'; import { AgendaList, CalendarProvider } from 'react-native-calendars'; - +import { getDates, agendaItems } from './mock'; import AgendaItem from './agendaItem'; +import { StyleSheet } from 'react-native'; const Agenda = () => { - const dates = [ - '2024-04-01', - '2024-04-02', - '2024-04-03', - '2024-04-04', - '2024-04-05', - '2024-04-06', - '2024-04-07', - '2024-04-08', - '2024-04-09', - '2024-04-10', - '2024-04-11', - '2024-04-12', - '2024-04-13', - '2024-04-14' - ]; - const agendaItems = [ - { - title: dates[0], - data: [{ hour: '12am', duration: '1h', title: 'Club GM' }] - }, - { - title: dates[1], - data: [ - { hour: '4pm', duration: '1h', title: 'Intramural game' }, - { hour: '5pm', duration: '1h', title: 'Generate Team Meeting' }, - { hour: '5pm', duration: '1h', title: 'Other commitment' } - ] - }, - { - title: dates[2], - data: [ - { hour: '1pm', duration: '1h', title: 'Dance Crew Rehearsal' }, - { hour: '2pm', duration: '1h', title: 'Intramural game' }, - { hour: '3pm', duration: '1h', title: 'Club GM' } - ] - }, - { - title: dates[3], - data: [{ hour: '12am', duration: '1h', title: 'Ashtanga Yoga' }] - }, - { - title: dates[4], - data: [] - }, - { - title: dates[5], - data: [ - { - hour: '11pm', - duration: '1h', - title: 'Generate Team Meeting' - }, - { hour: '12pm', duration: '1h', title: 'Running Group' } - ] - }, - { - title: dates[6], - data: [{ hour: '12am', duration: '1h', title: 'Intramural game' }] - }, - { - title: dates[7], - data: [] - }, - { - title: dates[8], - data: [ - { hour: '9pm', duration: '1h', title: 'Cheese Club GM' }, - { hour: '10pm', duration: '1h', title: 'Club GM' }, - { hour: '11pm', duration: '1h', title: 'Intramural game' }, - { hour: '12pm', duration: '1h', title: 'Running Group' } - ] - }, - { - title: dates[9], - data: [ - { hour: '1pm', duration: '1h', title: 'Intramural game' }, - { hour: '2pm', duration: '1h', title: 'Club GM' }, - { hour: '3pm', duration: '1h', title: 'Private Yoga' } - ] - }, - { - title: dates[10], - data: [{ hour: '12am', duration: '1h', title: 'Gym Workout' }] - }, - { - title: dates[11], - data: [ - { hour: '1pm', duration: '1h', title: 'Intramural game' }, - { hour: '2pm', duration: '1h', title: 'Club GM' }, - { hour: '3pm', duration: '1h', title: 'Private Yoga' } - ] - }, - { - title: dates[12], - data: [{ hour: '12am', duration: '1h', title: 'Gym Workout' }] - }, - { - title: dates[13], - data: [{ hour: '12am', duration: '1h', title: 'Gym Workout' }] - } - ]; + const dates = getDates(2024, 4) const renderItem = useCallback(({ item }: any) => { return ; @@ -114,6 +14,7 @@ const Agenda = () => { return ( { - const {item} = props; + const { item } = props; + + const buttonPressed = useCallback(() => { + Alert.alert('Show me more'); + }, []); - const buttonPressed = useCallback(() => { - Alert.alert('Show me more'); - }, []); + const itemPressed = useCallback(() => { + Alert.alert(item.title); + }, []); - const itemPressed = useCallback(() => { - Alert.alert(item.title); - }, []); + if (!item) { + return ( + + + No Events Planned Today + + + ); + } - if (!item) { return ( - - No Events Planned Today - + + + {item.hour} + {item.duration} + + + {item.title} + {item.location} + + +