diff --git a/Components/CurrentEventCard.tsx b/Components/CurrentEventCard.tsx index 8ef6ba0..8ef55b7 100644 --- a/Components/CurrentEventCard.tsx +++ b/Components/CurrentEventCard.tsx @@ -18,7 +18,7 @@ import CustomModal from "./CustomModal"; // Import the custom modal // import AppLoading from "expo-app-loading"; import Colors from "../constants/Colors"; -import {formatTime} from "../navigation/DayEvent"; +import { formatTime } from "../navigation/DayEvent"; import EvilIcons from "@expo/vector-icons/EvilIcons"; @@ -52,9 +52,9 @@ const CurrentEventCard = ({ const start = new Date(startTime); const end = new Date(endTime); -// console.log("CURRENT", currentTime); -// console.log("START", start); -// console.log("END", end); + // console.log("CURRENT", currentTime); + // console.log("START", start); + // console.log("END", end); // Check if current time is within the event's duration const isOngoing = currentTime >= start && currentTime <= end; @@ -78,7 +78,7 @@ const CurrentEventCard = ({ x{points} diff --git a/Components/PrizeSVG.tsx b/Components/PrizeSVG.tsx new file mode 100644 index 0000000..1d5ce34 --- /dev/null +++ b/Components/PrizeSVG.tsx @@ -0,0 +1,47 @@ +import React from "react"; +import { View, Text } from "react-native"; +import { StyledText } from "./Text"; + +import Question1 from "../assets/SVGs/myRP/blue-question.svg"; +import Question2 from "../assets/SVGs/myRP/purple-question.svg"; +import Question3 from "../assets/SVGs/myRP/pink-question.svg"; +import Button from "../assets/SVGs/myRP/button.svg"; +import ToteBag from "../assets/SVGs/myRP/tote-bag.svg"; +import Cap from "../assets/SVGs/myRP/cap.svg"; + +interface PrizeSVGProps { + prizeNum: number; + attendeePoints: number; + token: string; +} + +const PrizeSVG: React.FC = ({ + prizeNum, + attendeePoints, + token, +}) => { + const size = 100; + + const getSVG = () => { + if (token) { + // Map SVGs based on prizeNum and attendeePoints + const svgMap: { [key: number]: JSX.Element } = { + 1: attendeePoints >= 20 ?