From 3fd2a726b3c6b684fdbac887b75986dd80576c33 Mon Sep 17 00:00:00 2001 From: Tawanda Kembo Date: Sun, 22 Sep 2024 17:51:12 +0200 Subject: [PATCH] chore: adds back accidentally deleted requirements --- docs/examples/.DS_Store | Bin 6148 -> 0 bytes .../appointment-scheduler/.firebaserc | 5 - .../examples/appointment-scheduler/.gitignore | 22 --- docs/examples/appointment-scheduler/README.md | 50 ------ docs/examples/appointment-scheduler/app.json | 36 ----- .../app/(tabs)/_layout.tsx | 45 ------ .../app/(tabs)/appointments.tsx | 149 ------------------ .../app/(tabs)/explore.tsx | 102 ------------ .../app/(tabs)/index.tsx | 52 ------ .../app/(tabs)/profile.tsx | 135 ---------------- .../appointment-scheduler/app/+html.tsx | 39 ----- .../appointment-scheduler/app/+not-found.tsx | 32 ---- .../appointment-scheduler/app/_layout.tsx | 40 ----- .../appointment-scheduler/app/auth.tsx | 80 ---------- .../assets/fonts/SpaceMono-Regular.ttf | Bin 93252 -> 0 bytes .../assets/images/adaptive-icon.png | Bin 17547 -> 0 bytes .../assets/images/favicon.png | Bin 1466 -> 0 bytes .../assets/images/icon.png | Bin 22380 -> 0 bytes .../assets/images/partial-react-logo.png | Bin 5075 -> 0 bytes .../assets/images/react-logo.png | Bin 6341 -> 0 bytes .../assets/images/react-logo@2x.png | Bin 14225 -> 0 bytes .../assets/images/react-logo@3x.png | Bin 21252 -> 0 bytes .../assets/images/splash.png | Bin 47346 -> 0 bytes .../appointment-scheduler/babel.config.js | 16 -- .../components/Collapsible.tsx | 41 ----- .../components/ExternalLink.tsx | 24 --- .../components/HelloWave.tsx | 37 ----- .../components/ParallaxScrollView.tsx | 76 --------- .../components/Themed.tsx | 40 ----- .../components/ThemedText.tsx | 60 ------- .../components/ThemedView.tsx | 14 -- .../components/__tests__/ThemedText-test.tsx | 10 -- .../__snapshots__/ThemedText-test.tsx.snap | 24 --- .../components/navigation/TabBarIcon.tsx | 9 -- .../appointment-scheduler/constants/Colors.ts | 24 --- .../docs/requirements.md | 76 --------- .../appointment-scheduler/firebase.json | 15 -- .../appointment-scheduler/firebaseConfig.ts | 25 --- .../functions/.gitignore | 2 - .../appointment-scheduler/functions/index.js | 19 --- .../functions/package.json | 24 --- .../hooks/useColorScheme.ts | 8 - .../hooks/useColorScheme.web.ts | 8 - .../hooks/useThemeColor.ts | 22 --- .../appointment-scheduler/package.json | 57 ------- .../scripts/reset-project.js | 73 --------- .../appointment-scheduler/tsconfig.json | 17 -- .../appointment-scheduler.md | 101 ------------ docs/examples/custom_instructions/template.md | 41 ----- requirements.txt | 36 +++++ 50 files changed, 36 insertions(+), 1650 deletions(-) delete mode 100644 docs/examples/.DS_Store delete mode 100644 docs/examples/appointment-scheduler/.firebaserc delete mode 100644 docs/examples/appointment-scheduler/.gitignore delete mode 100644 docs/examples/appointment-scheduler/README.md delete mode 100644 docs/examples/appointment-scheduler/app.json delete mode 100644 docs/examples/appointment-scheduler/app/(tabs)/_layout.tsx delete mode 100644 docs/examples/appointment-scheduler/app/(tabs)/appointments.tsx delete mode 100644 docs/examples/appointment-scheduler/app/(tabs)/explore.tsx delete mode 100644 docs/examples/appointment-scheduler/app/(tabs)/index.tsx delete mode 100644 docs/examples/appointment-scheduler/app/(tabs)/profile.tsx delete mode 100644 docs/examples/appointment-scheduler/app/+html.tsx delete mode 100644 docs/examples/appointment-scheduler/app/+not-found.tsx delete mode 100644 docs/examples/appointment-scheduler/app/_layout.tsx delete mode 100644 docs/examples/appointment-scheduler/app/auth.tsx delete mode 100755 docs/examples/appointment-scheduler/assets/fonts/SpaceMono-Regular.ttf delete mode 100644 docs/examples/appointment-scheduler/assets/images/adaptive-icon.png delete mode 100644 docs/examples/appointment-scheduler/assets/images/favicon.png delete mode 100644 docs/examples/appointment-scheduler/assets/images/icon.png delete mode 100644 docs/examples/appointment-scheduler/assets/images/partial-react-logo.png delete mode 100644 docs/examples/appointment-scheduler/assets/images/react-logo.png delete mode 100644 docs/examples/appointment-scheduler/assets/images/react-logo@2x.png delete mode 100644 docs/examples/appointment-scheduler/assets/images/react-logo@3x.png delete mode 100644 docs/examples/appointment-scheduler/assets/images/splash.png delete mode 100644 docs/examples/appointment-scheduler/babel.config.js delete mode 100644 docs/examples/appointment-scheduler/components/Collapsible.tsx delete mode 100644 docs/examples/appointment-scheduler/components/ExternalLink.tsx delete mode 100644 docs/examples/appointment-scheduler/components/HelloWave.tsx delete mode 100644 docs/examples/appointment-scheduler/components/ParallaxScrollView.tsx delete mode 100644 docs/examples/appointment-scheduler/components/Themed.tsx delete mode 100644 docs/examples/appointment-scheduler/components/ThemedText.tsx delete mode 100644 docs/examples/appointment-scheduler/components/ThemedView.tsx delete mode 100644 docs/examples/appointment-scheduler/components/__tests__/ThemedText-test.tsx delete mode 100644 docs/examples/appointment-scheduler/components/__tests__/__snapshots__/ThemedText-test.tsx.snap delete mode 100644 docs/examples/appointment-scheduler/components/navigation/TabBarIcon.tsx delete mode 100644 docs/examples/appointment-scheduler/constants/Colors.ts delete mode 100644 docs/examples/appointment-scheduler/docs/requirements.md delete mode 100644 docs/examples/appointment-scheduler/firebase.json delete mode 100644 docs/examples/appointment-scheduler/firebaseConfig.ts delete mode 100644 docs/examples/appointment-scheduler/functions/.gitignore delete mode 100644 docs/examples/appointment-scheduler/functions/index.js delete mode 100644 docs/examples/appointment-scheduler/functions/package.json delete mode 100644 docs/examples/appointment-scheduler/hooks/useColorScheme.ts delete mode 100644 docs/examples/appointment-scheduler/hooks/useColorScheme.web.ts delete mode 100644 docs/examples/appointment-scheduler/hooks/useThemeColor.ts delete mode 100644 docs/examples/appointment-scheduler/package.json delete mode 100755 docs/examples/appointment-scheduler/scripts/reset-project.js delete mode 100644 docs/examples/appointment-scheduler/tsconfig.json delete mode 100644 docs/examples/custom_instructions/appointment-scheduler.md delete mode 100644 docs/examples/custom_instructions/template.md diff --git a/docs/examples/.DS_Store b/docs/examples/.DS_Store deleted file mode 100644 index 412e74090d62d1587ea4c63aa63530776383de70..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~%}&BV5XWZ$g~ph0&_r*Wc*Tf{2IHkcd;x3ppaxq@q_K1fEpi|vz3U74B0i5Z zyNi*i2M?NHX2|Sszh<}nFWKz^fM|`vU4SY8RM3e92a_+1+Q~mz!PXFk9wUMTGU!7W z$+idz(Auqo4+H!u__%%v_F5UT*AUV=d!rCGiHDhkEY(sH@% zlvm0(UQdm^%+E$?%O74*>0GHenC1Q8BI=Gi)wL6qWPX%%hdLk%yV&LWGD<=%I>y=hHOj`r#`**I)Wr%q*kYv=f^^APtF^<;Dx_?OhS zYB|F*W`6L>kKQneRdSC}vk_+_F`O=S2D&z^my|)emboF;pz()*mVpyi;7=8J1L<8?6aWAK diff --git a/docs/examples/appointment-scheduler/.firebaserc b/docs/examples/appointment-scheduler/.firebaserc deleted file mode 100644 index b99b50b..0000000 --- a/docs/examples/appointment-scheduler/.firebaserc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "projects": { - "default": "code-collator" - } -} diff --git a/docs/examples/appointment-scheduler/.gitignore b/docs/examples/appointment-scheduler/.gitignore deleted file mode 100644 index 3e73a2d..0000000 --- a/docs/examples/appointment-scheduler/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -node_modules/ -.expo/ -dist/ -npm-debug.* -*.jks -*.p8 -*.p12 -*.key -*.mobileprovision -*.orig.* -web-build/ - -# macOS -.DS_Store - -# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb -# The following patterns were generated by expo-cli - -expo-env.d.ts -# @end expo-cli - -package-lock.json \ No newline at end of file diff --git a/docs/examples/appointment-scheduler/README.md b/docs/examples/appointment-scheduler/README.md deleted file mode 100644 index cd4feb8..0000000 --- a/docs/examples/appointment-scheduler/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# Welcome to your Expo app 👋 - -This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app). - -## Get started - -1. Install dependencies - - ```bash - npm install - ``` - -2. Start the app - - ```bash - npx expo start - ``` - -In the output, you'll find options to open the app in a - -- [development build](https://docs.expo.dev/develop/development-builds/introduction/) -- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/) -- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/) -- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo - -You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction). - -## Get a fresh project - -When you're ready, run: - -```bash -npm run reset-project -``` - -This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing. - -## Learn more - -To learn more about developing your project with Expo, look at the following resources: - -- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides). -- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web. - -## Join the community - -Join our community of developers creating universal apps. - -- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute. -- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions. diff --git a/docs/examples/appointment-scheduler/app.json b/docs/examples/appointment-scheduler/app.json deleted file mode 100644 index 462652b..0000000 --- a/docs/examples/appointment-scheduler/app.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "expo": { - "name": "appointment-scheduler", - "slug": "appointment-scheduler", - "version": "1.0.0", - "orientation": "portrait", - "icon": "./assets/images/icon.png", - "scheme": "myapp", - "userInterfaceStyle": "automatic", - "splash": { - "image": "./assets/images/splash.png", - "resizeMode": "contain", - "backgroundColor": "#ffffff" - }, - "ios": { - "supportsTablet": true - }, - "android": { - "adaptiveIcon": { - "foregroundImage": "./assets/images/adaptive-icon.png", - "backgroundColor": "#ffffff" - } - }, - "web": { - "bundler": "metro", - "output": "static", - "favicon": "./assets/images/favicon.png" - }, - "plugins": [ - "expo-router" - ], - "experiments": { - "typedRoutes": true - } - } -} diff --git a/docs/examples/appointment-scheduler/app/(tabs)/_layout.tsx b/docs/examples/appointment-scheduler/app/(tabs)/_layout.tsx deleted file mode 100644 index e6b49b2..0000000 --- a/docs/examples/appointment-scheduler/app/(tabs)/_layout.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import FontAwesome from '@expo/vector-icons/FontAwesome'; -import { Tabs } from 'expo-router'; -import { useColorScheme } from 'react-native'; - -import Colors from '@/constants/Colors'; - -function TabBarIcon(props: { - name: React.ComponentProps['name']; - color: string; -}) { - return ; -} - -export default function TabLayout() { - const colorScheme = useColorScheme(); - - return ( - - , - }} - /> - , - }} - /> - , - }} - /> - - ); -} \ No newline at end of file diff --git a/docs/examples/appointment-scheduler/app/(tabs)/appointments.tsx b/docs/examples/appointment-scheduler/app/(tabs)/appointments.tsx deleted file mode 100644 index 46fc518..0000000 --- a/docs/examples/appointment-scheduler/app/(tabs)/appointments.tsx +++ /dev/null @@ -1,149 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import { StyleSheet, ScrollView, Button, Alert, FlatList } from 'react-native'; -import { Calendar } from 'react-native-calendars'; -import { collection, addDoc, query, where, getDocs, deleteDoc, doc } from 'firebase/firestore'; -import { auth, db } from '../../firebaseConfig'; - -import { Text, View } from '@/components/Themed'; - -const TIME_SLOTS = [ - '09:00', '10:00', '11:00', '12:00', '14:00', '15:00', '16:00', '17:00' -]; - -export default function AppointmentsScreen() { - const [selected, setSelected] = useState(''); - const [availableSlots, setAvailableSlots] = useState(TIME_SLOTS); - const [userAppointments, setUserAppointments] = useState([]); - - useEffect(() => { - if (selected) { - fetchBookedSlots(); - } - fetchUserAppointments(); - }, [selected]); - - const fetchBookedSlots = async () => { - const appointmentsRef = collection(db, 'appointments'); - const q = query(appointmentsRef, where('date', '==', selected)); - const querySnapshot = await getDocs(q); - const bookedSlots = querySnapshot.docs.map(doc => doc.data().time); - setAvailableSlots(TIME_SLOTS.filter(slot => !bookedSlots.includes(slot))); - }; - - const fetchUserAppointments = async () => { - if (auth.currentUser) { - const appointmentsRef = collection(db, 'appointments'); - const q = query(appointmentsRef, where('userId', '==', auth.currentUser.uid)); - const querySnapshot = await getDocs(q); - const appointments = querySnapshot.docs.map(doc => ({ - id: doc.id, - ...doc.data() - })); - setUserAppointments(appointments); - } - }; - - const bookAppointment = async (time: string) => { - try { - await addDoc(collection(db, 'appointments'), { - userId: auth.currentUser?.uid, - date: selected, - time: time, - }); - Alert.alert('Success', 'Appointment booked successfully!'); - fetchBookedSlots(); - fetchUserAppointments(); - } catch (error) { - Alert.alert('Error', 'Failed to book appointment. Please try again.'); - } - }; - - const cancelAppointment = async (appointmentId: string) => { - try { - await deleteDoc(doc(db, 'appointments', appointmentId)); - Alert.alert('Success', 'Appointment cancelled successfully!'); - fetchUserAppointments(); - } catch (error) { - Alert.alert('Error', 'Failed to cancel appointment. Please try again.'); - } - }; - - const renderAppointment = ({ item }) => ( - - {`Date: ${item.date}, Time: ${item.time}`} -