From 9ba03f4e26002594c8a6d8a250623b24f8e7fa7d Mon Sep 17 00:00:00 2001 From: Bahl-Aryan Date: Wed, 4 Sep 2024 18:02:38 -0500 Subject: [PATCH 1/3] last couple updates --- navigation/Navigation.tsx | 28 +++++++++++++--------------- package.json | 1 + 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/navigation/Navigation.tsx b/navigation/Navigation.tsx index 2456c14..6972316 100644 --- a/navigation/Navigation.tsx +++ b/navigation/Navigation.tsx @@ -2,6 +2,7 @@ import React from "react"; import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; import { createStackNavigator } from "@react-navigation/stack"; import { FontAwesome } from "@expo/vector-icons"; +import MaterialCommunityIcons from "@expo/vector-icons/MaterialCommunityIcons"; import { View } from "react-native"; import Home from "../screens/Home"; import Events from "../screens/Events"; @@ -36,8 +37,8 @@ const AppNavigator: React.FC = () => { switch (route.name) { case "Home": return ( - { ); case "Events": return ( - ); case "Camera": return ( - ); case "AdminScanner": return ( - ); case "Shop": return ( - ); case "Profile": return ( - Date: Wed, 4 Sep 2024 18:04:03 -0500 Subject: [PATCH 2/3] package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 997b981..71e58f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rp-mobile-2024", - "version": "1.0.0", + "version": "1.3.0", "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", From 17fe2f23124bb265e4dc61bd7b380bf00d4f7bd7 Mon Sep 17 00:00:00 2001 From: Bahl-Aryan Date: Wed, 4 Sep 2024 19:36:31 -0500 Subject: [PATCH 3/3] more updates --- Components/FoodWaveSVG.tsx | 4 --- api/getFoodWave.tsx | 15 +++++++++++ assets/SVGs/pink-question_1.svg | 9 +++++++ assets/SVGs/purple-question_1.svg | 9 +++++++ assets/SVGs/qrcode/QRFrame1.svg | 18 +++++++++++++ assets/SVGs/question 1.png | Bin 0 -> 8486 bytes assets/SVGs/question_1.svg | 21 +++++++++++++++ package.json | 2 +- screens/Profile.tsx | 24 ++++++++++++++--- screens/Shop.tsx | 42 +++++++++++++++++++++--------- 10 files changed, 122 insertions(+), 22 deletions(-) create mode 100644 api/getFoodWave.tsx create mode 100644 assets/SVGs/pink-question_1.svg create mode 100644 assets/SVGs/purple-question_1.svg create mode 100644 assets/SVGs/qrcode/QRFrame1.svg create mode 100644 assets/SVGs/question 1.png create mode 100644 assets/SVGs/question_1.svg diff --git a/Components/FoodWaveSVG.tsx b/Components/FoodWaveSVG.tsx index e1d90ce..ca14648 100644 --- a/Components/FoodWaveSVG.tsx +++ b/Components/FoodWaveSVG.tsx @@ -18,11 +18,7 @@ const FoodWaveSVG: React.FC = ({ foodWave }) => { case 1: return ; case 2: - return ; - case 3: return ; - case 4: - return ; default: return No SVG available } diff --git a/api/getFoodWave.tsx b/api/getFoodWave.tsx new file mode 100644 index 0000000..60fd44f --- /dev/null +++ b/api/getFoodWave.tsx @@ -0,0 +1,15 @@ +import axios from "axios"; + +export const getFoodWave = async (token: string) => { + try{ + const response = await axios.get('https://api.reflectionsprojections.org/attendee/foodwave/', { + headers: { + Authorization: token + } + }); + return response.data; + } catch (error) { + console.error("Error in catching food wave:", error); + throw error; + } +} \ No newline at end of file diff --git a/assets/SVGs/pink-question_1.svg b/assets/SVGs/pink-question_1.svg new file mode 100644 index 0000000..d0e078a --- /dev/null +++ b/assets/SVGs/pink-question_1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/SVGs/purple-question_1.svg b/assets/SVGs/purple-question_1.svg new file mode 100644 index 0000000..3dbaa23 --- /dev/null +++ b/assets/SVGs/purple-question_1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/SVGs/qrcode/QRFrame1.svg b/assets/SVGs/qrcode/QRFrame1.svg new file mode 100644 index 0000000..aaac215 --- /dev/null +++ b/assets/SVGs/qrcode/QRFrame1.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/assets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cZ4b8Rh+c;)$o;^nI9~?lruSp_id2 z_U*onOW5D{L3_Cl`?~%UQx$9qQ<%aOrZ9ymOkoOBn8FmMFoh{hVG2{2!YdK}9~BnX U#5wAAH2?qr07*qoM6N<$f<1g@6#xJL literal 0 HcmV?d00001 diff --git a/assets/SVGs/question_1.svg b/assets/SVGs/question_1.svg new file mode 100644 index 0000000..cf30c1e --- /dev/null +++ b/assets/SVGs/question_1.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/package.json b/package.json index 71e58f8..08cd6cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rp-mobile-2024", - "version": "1.3.0", + "version": "1.3.1", "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", diff --git a/screens/Profile.tsx b/screens/Profile.tsx index d50056a..ef96c4b 100644 --- a/screens/Profile.tsx +++ b/screens/Profile.tsx @@ -20,9 +20,11 @@ import { logout } from "../redux/actions"; import { useNavigation } from "@react-navigation/native"; import { StackNavigationProp } from "@react-navigation/stack"; -import QRFrame from '../assets/SVGs/qrcode/qr_frame.svg' +import QRFrame from '../assets/SVGs/qrcode/QRFrame1.svg' +import QRFrame2 from '../assets/SVGs/qrcode/qr_frame.svg' import Background from '../assets/SVGs/home/home_bg.svg' import Logout from '../assets/SVGs/profile/logout.svg' +import { getFoodWave } from "../api/getFoodWave"; const {width, height} = Dimensions.get("window") type RootStackParamList = { @@ -40,6 +42,8 @@ const Profile: React.FC = () => { const attendee = useAppSelector((state: RootState) => state.attendee); const qrcode = useAppSelector((state: RootState) => state.qrCodeURL); + const [foodWave, setFoodWave] = useState(null); + useEffect(() => { if (token && !attendee) { dispatch(getAttendee(token)); @@ -49,6 +53,14 @@ const Profile: React.FC = () => { } }, [token, attendee, qrcode, dispatch]); + useEffect(() => { + const fetchFoodWave = async () => { + const foodwave = await getFoodWave(token); + setFoodWave(foodwave.foodwave); + } + fetchFoodWave(); + }, [token]) + useEffect(() => { const fetchQRCode = async() => { if (token) { @@ -119,16 +131,20 @@ const Profile: React.FC = () => { {attendee && qrcode && - + {foodWave == 1 ? ( + + ) : ( + + )} {attendee.name} - + } ); diff --git a/screens/Shop.tsx b/screens/Shop.tsx index e7df51f..02ef57b 100644 --- a/screens/Shop.tsx +++ b/screens/Shop.tsx @@ -9,6 +9,10 @@ import { } from "@expo-google-fonts/press-start-2p"; import AppLoading from "expo-app-loading"; +import Question1 from "../assets/SVGs/question_1.svg" +import Question2 from "../assets/SVGs/purple-question_1.svg" +import Question3 from "../assets/SVGs/pink-question_1.svg" + import VerticalProgressBar from '../Components/VerticalProgressBar'; import { getPoints } from "../api/getPoints"; @@ -47,14 +51,18 @@ const Shop: React.FC = () => { source={require("../assets/token.png")} style={styles.tokenImage} /> - x{userPoints} + x{userPoints} - */} + { x{50} - { x{35} -