From d6e7f408afe0d9ef01147bf7b9b4070ddc022d41 Mon Sep 17 00:00:00 2001 From: liuisaac <80558145+liuisaac@users.noreply.github.com> Date: Tue, 19 Nov 2024 21:03:03 -0800 Subject: [PATCH 1/3] added leaderboard poc and fixed withdrawl button --- .../components/dataverse/Dashboard.js | 5 +- .../components/dataverse/Leaderboard.js | 272 ++++++++++++++---- .../Companion/components/dataverse/Quiz.js | 4 +- .../public/Companion/events/DataVerse2024.js | 36 +-- src/router.js | 5 +- 5 files changed, 246 insertions(+), 76 deletions(-) diff --git a/src/pages/public/Companion/components/dataverse/Dashboard.js b/src/pages/public/Companion/components/dataverse/Dashboard.js index b0a85b62..51dbdb4c 100644 --- a/src/pages/public/Companion/components/dataverse/Dashboard.js +++ b/src/pages/public/Companion/components/dataverse/Dashboard.js @@ -2,12 +2,11 @@ import React, { useEffect } from "react"; import { useLocation, useHistory } from "react-router-dom"; import { Typography } from "@material-ui/core"; import Quiz from "./Quiz"; -import Leaderboard from "./Leaderboard"; const useStyles = { root: { position: "relative", - minHeight: "180vh", + minHeight: "100vh", background: "linear-gradient(135deg, #3C1F62, #5A3D89, #2F3C53, #121C2C)", color: "white", padding: "20px", @@ -82,8 +81,6 @@ const Dashboard = () => { - - )} diff --git a/src/pages/public/Companion/components/dataverse/Leaderboard.js b/src/pages/public/Companion/components/dataverse/Leaderboard.js index 2481d408..c08737dc 100644 --- a/src/pages/public/Companion/components/dataverse/Leaderboard.js +++ b/src/pages/public/Companion/components/dataverse/Leaderboard.js @@ -1,64 +1,236 @@ -import React from "react"; -import { Box, Typography, Button } from "@material-ui/core"; +import React, { useState } from "react"; +import { motion, AnimatePresence } from "framer-motion"; +import { ThemeProvider, createTheme } from "@mui/material/styles"; +import { + CssBaseline, + Box, + Typography, + List, + ListItem, + Button +} from "@mui/material"; +import EmojiEventsIcon from "@mui/icons-material/EmojiEvents"; +import MilitaryTechIcon from "@mui/icons-material/MilitaryTech"; +import WorkspacePremiumIcon from "@mui/icons-material/WorkspacePremium"; + +const theme = createTheme({ + components: { + MuiCssBaseline: { + styleOverrides: { + body: { + background: "linear-gradient(135deg, #3C1F62, #5A3D89, #2F3C53, #121C2C)", + minHeight: "100vh", + margin: 0, + }, + }, + }, + }, + palette: { + primary: { + main: "#8b5cf6" + }, + secondary: { + main: "#6366f1" + } + }, +}); + +function Leaderboard({ teams: initialTeams }) { + const [teams, setTeams] = useState(initialTeams); + + const updateRandomTeams = () => { + setTeams((prevTeams) => { + const newTeams = [...prevTeams]; + const indices = new Set(); + while (indices.size < 2) { + indices.add(Math.floor(Math.random() * newTeams.length)); + } + + indices.forEach((index) => { + newTeams[index] = { + ...newTeams[index], + score: Math.floor(Math.random() * 150) + }; + }); + + return newTeams.sort((a, b) => b.score - a.score); + }); + }; + + const getRankIcon = (index) => { + switch (index) { + case 0: + return ; + case 1: + return ; + case 2: + return ; + default: + return null; + } + }; -const LeaderboardRow = ({ placement, teamName, score, isTeam }) => { return ( - {placement} - {teamName} - {score} + + + Leaderboard + + + + + {teams.map((team, index) => ( + + + + + + {getRankIcon(index) || index + 1} + + + + + {team.name} + + + {team.score} + + + + ))} + + + + + ); -}; +} + +function GlobalLeaderboardExample() { + const initialTeams = [ + { id: "1", name: "Team Alpha", score: 100 }, + { id: "2", name: "Team Beta", score: 85 }, + { id: "3", name: "Team Gamma", score: 95 }, + { id: "4", name: "Team Delta", score: 70 }, + { id: "5", name: "Team Epsilon", score: 110 }, + { id: "6", name: "Team Zeta", score: 90 }, + { id: "7", name: "Team Eta", score: 75 }, + { id: "8", name: "Team Theta", score: 105 }, + { id: "9", name: "Team Iota", score: 80 }, + { id: "10", name: "Team Omega", score: 95 }, + ]; -const Leaderboard = ({ teamName, teamScore }) => { return ( -
- - Leaderboard - - - Check out how your team is doing: - + + + + + + + ); +} -
- - - - ... - - - -
+function LocalLeaderboardExample() { + const initialTeams = [ + { id: "1", name: "Team Alpha", score: 100 }, + { id: "2", name: "Team Beta", score: 85 }, + { id: "3", name: "Team Gamma", score: 95 }, + { id: "4", name: "Team Delta", score: 70 }, + { id: "5", name: "Team Epsilon", score: 110 }, + { id: "6", name: "Team Zeta", score: 90 }, + { id: "7", name: "Team Eta", score: 75 }, + { id: "8", name: "Team Theta", score: 105 }, + { id: "9", name: "Team Iota", score: 80 }, + { id: "10", name: "Team Omega", score: 95 }, + ]; - -
+ return ( + + + + + + ); -}; +} -export default Leaderboard; +export { GlobalLeaderboardExample, LocalLeaderboardExample }; \ No newline at end of file diff --git a/src/pages/public/Companion/components/dataverse/Quiz.js b/src/pages/public/Companion/components/dataverse/Quiz.js index e65f940f..eccad799 100644 --- a/src/pages/public/Companion/components/dataverse/Quiz.js +++ b/src/pages/public/Companion/components/dataverse/Quiz.js @@ -1,5 +1,6 @@ import React, { useState } from "react"; import { Typography, Button, TextField, FormControl } from "@material-ui/core"; +import { LocalLeaderboardExample } from "./Leaderboard"; const QuizRoom = ({ roomNumber, goBack }) => { const [answers, setAnswers] = useState(Array(5).fill("")); // Array to hold answers for 5 questions @@ -138,6 +139,7 @@ const QuizRoom = ({ roomNumber, goBack }) => { const buttonCardStyle = { margin: "10px", + marginBottom: "200px", padding: "25px 50px", fontSize: "18px", backgroundColor: "rgba(255, 255, 255, 0.05)", // Transparent background with 10% opacity @@ -178,7 +180,7 @@ const QuizDashboard = () => { } return ( -
+
Quizzes diff --git a/src/pages/public/Companion/events/DataVerse2024.js b/src/pages/public/Companion/events/DataVerse2024.js index 906c884e..0b6f6d41 100644 --- a/src/pages/public/Companion/events/DataVerse2024.js +++ b/src/pages/public/Companion/events/DataVerse2024.js @@ -129,6 +129,24 @@ const DataVerse2024 = (params) => { ) : ( Loading your team data... )} + + ) : ( + <> +
+ setAccessKey(e.target.value)} + /> + +
{userRegistration.applicationStatus !== "rejected" && ( { for any questions or concerns.
- ) : ( - <> -
- setAccessKey(e.target.value)} - /> - -
- )}
); diff --git a/src/router.js b/src/router.js index 33448b43..9e002128 100644 --- a/src/router.js +++ b/src/router.js @@ -26,9 +26,8 @@ import FormSuccess from "pages/public/RegistrationForms/FormSuccess"; import RegistrationForm from "pages/public/RegistrationForms"; import Companion from "pages/public/Companion"; import CompanionReset from "./pages/public/Companion/ResetPage"; -import Leaderboard from "pages/public/Companion/components/dataverse/Leaderboard"; import Dashboard from "pages/public/Companion/components/dataverse/Dashboard"; - +import { GlobalLeaderboardExample } from "pages/public/Companion/components/dataverse/Leaderboard"; // import Signup from '../pages/public/Signup' import EventsDashboard from "pages/public/EventsDashboard"; @@ -162,7 +161,7 @@ class Router extends Component { /> } /> } /> - } /> + } /> {/* ADMIN ROUTES */} {user && } From f51b724b22af7dc7bdf6098fb70b722de2fb8737 Mon Sep 17 00:00:00 2001 From: liuisaac <80558145+liuisaac@users.noreply.github.com> Date: Sat, 23 Nov 2024 17:24:41 -0800 Subject: [PATCH 2/3] implemented new ui and quiz1 problems --- src/assets/font/Audiowide-Regular.ttf | Bin 0 -> 47676 bytes src/index.scss | 8 + .../components/dataverse/Dashboard.js | 79 +--- .../components/dataverse/Progress.js | 257 +++++++++++++ .../Companion/components/dataverse/Quiz.js | 339 ++++++++---------- .../components/dataverse/QuizRoom.js | 278 ++++++++++++++ .../Companion/components/dataverse/Timer.js | 102 ++++++ 7 files changed, 811 insertions(+), 252 deletions(-) create mode 100644 src/assets/font/Audiowide-Regular.ttf create mode 100644 src/pages/public/Companion/components/dataverse/Progress.js create mode 100644 src/pages/public/Companion/components/dataverse/QuizRoom.js create mode 100644 src/pages/public/Companion/components/dataverse/Timer.js diff --git a/src/assets/font/Audiowide-Regular.ttf b/src/assets/font/Audiowide-Regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..348817d576f0f63d464e63aca4d2094ae2f08705 GIT binary patch literal 47676 zcmce<2Vhji+VDSfwxp1R^Z*ITZh9we6MFAedPf3;o`4j)*vrL&mAt91v_xsH`n`A-mec%86?)T5(*;8ibnP;9l&&=6HNFhWZA7&v2 zT{UWKL(xn33K1PBMDK?OjUC_j;rCzrNC@jBA+%GY#&*hCw5HoyA>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Gk!P9PvP}UIAT@b$a?PtzMJJ# zn{rNbd5M!8!m-PfF$rzmiI@dth%e$@?eDT8{YiuD8$<{?Abq^aVnzD1O=K9unDY;$ zmXBgamb!!FoJ03T&>3>h(bpQ*L65-MLpa8YZj)a8s)iW}9RTMX^(Z{B^+-$FYez<> zs6R8lK(6`?5k}rt%2zk0i)3-#2p89TSIMk(yt{~MXhjWiy!X)Ahsc&WS0zq+kHlN7 zIL{J^HxI#Sv?Sg%1gF^}@pZP}at~T@Hc`fW@!xAtvRhXs(yt0;PmY*hALP6VOuL6J zu+AO#^Ui-e>!LxN;Zcw{#Y`mL=3W0>-jBB{SX*8>eB#LR9STki;2hIn`7)-_fLM?p zCpm;8_CnhO%44h%eIr!gbpgOcp8+8!%)Cm&ZPbv20i5isZ~c#_y51 z$i#19y9e)}oR8Pejb%O!5>i2>i7nIS(`$K+i)YUo7wPo|BJ=E74ew4dj{NR-qF&UW z#qw8dyO2q~8{T*GEhlpBiQRN`(2t6jmfqZrcs$;Gg!lRu__-}wfz0dZBPkCd2jOMR hZ_Wn*`#41n@J@?0zpNB_!x92Sy*9nScNqQt{{T0sMt=YR literal 0 HcmV?d00001 diff --git a/src/index.scss b/src/index.scss index 852bb1fb..f120975a 100644 --- a/src/index.scss +++ b/src/index.scss @@ -75,6 +75,14 @@ font-display: auto; } +@font-face { + font-family: 'Audiowide'; + src: url('./assets/font/Audiowide-Regular.ttf') format('truetype'); + font-weight: 400; + font-style: normal; + font-display: swap; +} + .content { padding-top: 14px; margin-left: 110px; diff --git a/src/pages/public/Companion/components/dataverse/Dashboard.js b/src/pages/public/Companion/components/dataverse/Dashboard.js index 51dbdb4c..878e0094 100644 --- a/src/pages/public/Companion/components/dataverse/Dashboard.js +++ b/src/pages/public/Companion/components/dataverse/Dashboard.js @@ -1,51 +1,14 @@ import React, { useEffect } from "react"; import { useLocation, useHistory } from "react-router-dom"; -import { Typography } from "@material-ui/core"; import Quiz from "./Quiz"; -const useStyles = { - root: { - position: "relative", - minHeight: "100vh", - background: "linear-gradient(135deg, #3C1F62, #5A3D89, #2F3C53, #121C2C)", - color: "white", - padding: "20px", - textAlign: "center", // Centering the content - }, - heading: { - fontSize: "6rem", // Making the main heading bigger - fontWeight: "bold", // Making the text bold - marginTop: "40px", // Adding space above the heading - }, - subheading: { - fontSize: "1.5rem", // Increasing the font size for subheadings - fontWeight: "500", // Optional: make the subheading a bit lighter - }, - text: { - fontSize: "1.2rem", // Make other text a bit larger - }, - infoRow: { - display: "flex", // Align items in a row - justifyContent: "center", // Center the row - gap: "30px", // Space between the items - marginBottom: "20px", // Space below the row - }, - label: { - color: "#B0B0B0", // Gray color for labels - fontWeight: "500", // Optional: make labels a bit lighter - }, - value: { - background: "linear-gradient(to bottom, #FFFFFF, #7B7DFF)", // Gradient from white to light purple - WebkitBackgroundClip: "text", // Clip the background to the text - color: "transparent", // Make the text color transparent so the gradient shows through - fontWeight: "700", // Optional: make values bold - }, -}; const Dashboard = () => { + const startTime = new Date(); + const endTime = new Date(startTime.getTime() + 5 * 60000); const location = useLocation(); const history = useHistory(); - const { teamName, teamPoints, accessKey } = location.state || {}; + const { teamName, teamPoints } = location.state || {}; useEffect(() => { if (teamPoints == null || teamName == null) { @@ -54,36 +17,12 @@ const Dashboard = () => { }, [teamPoints, teamName, history]); return ( -
- {teamPoints == null || teamName == null ? ( - - Redirecting to Companion... - - ) : ( - <> - - Team Dashboard - - - {/* Flex container for the Team Name and Current Points */} -
- - Team Name: - - - {teamName} - - - Current Points: - - - {teamPoints} - -
- - - )} -
+ ); }; diff --git a/src/pages/public/Companion/components/dataverse/Progress.js b/src/pages/public/Companion/components/dataverse/Progress.js new file mode 100644 index 00000000..968cf8e8 --- /dev/null +++ b/src/pages/public/Companion/components/dataverse/Progress.js @@ -0,0 +1,257 @@ +import React, { useState, useRef, useEffect } from "react"; +import { Box, IconButton, TextField } from "@mui/material"; +import ArrowForwardIcon from "@mui/icons-material/ArrowForward"; + +const CharacterInput = ({ onSubmit, numChars = 21 }) => { + const [chars, setChars] = useState(Array(numChars).fill("")); // Initialize with empty strings + const [isTyping, setIsTyping] = useState(false); // To track if any character is typed + const inputRefs = useRef([]); + + const placeholderText = "final question answer"; // Your placeholder phrase + + useEffect(() => { + // Dynamically adjust the number of refs based on numChars + inputRefs.current = inputRefs.current.slice(0, numChars); + }, [numChars]); + + const handleChange = (index, value) => { + if (value.length <= 1) { + const newChars = [...chars]; + newChars[index] = value; // Set the current character + setChars(newChars); + + // Set isTyping to true when any input is typed + if (!isTyping && value !== "") { + setIsTyping(true); + } + + // Automatically focus on the next input if the current one is filled + if (index < numChars - 1 && value.length === 1) { + inputRefs.current[index + 1]?.focus(); + } + + // Check if all characters are cleared, reset isTyping to false + if (newChars.every((char) => char === "")) { + setIsTyping(false); + } + } + }; + + const handleKeyDown = (index, e) => { + if (e.key === "Backspace") { + if (chars[index] === "" && index > 0) { + inputRefs.current[index - 1]?.focus(); + } else { + const newChars = [...chars]; + newChars[index] = ""; // Clear the current character + setChars(newChars); + } + } else if (e.key === "ArrowLeft" && index > 0) { + inputRefs.current[index - 1]?.focus(); + } else if (e.key === "ArrowRight" && index < numChars - 1) { + inputRefs.current[index + 1]?.focus(); + } + }; + + const handleSubmit = () => { + const input = chars.join(""); + if (input.length === numChars) { + onSubmit(input); + setChars(Array(numChars).fill("")); // Reset the input fields + setIsTyping(false); // Reset typing state + inputRefs.current[0]?.focus(); // Focus the first input + } + }; + + return ( + + + {chars.map((char, index) => { + // If any input is typed, remove all placeholders; restore if all are cleared + const placeholderChar = isTyping && !chars.every((char) => char === "") + ? "" + : placeholderText[index] || ""; + + return ( + (inputRefs.current[index] = el)} + value={char} + onChange={(e) => handleChange(index, e.target.value)} + onKeyDown={(e) => handleKeyDown(index, e)} + variant="standard" + autoComplete="off" // Disable autofill + inputProps={{ + maxLength: 1, + style: { + width: "25px", + textAlign: "center", + fontFamily: "monospace", + fontSize: "1.5rem", + padding: "2px 0px", + color: "white", + }, + }} + placeholder={placeholderChar} // Set the placeholder as the corresponding character + sx={{ + width: "25px", + "& .MuiInput-underline:before": { + borderBottomWidth: "2px", + borderBottomColor: char ? "#ffffff" : "#AAAAAA", + }, + "& .MuiInput-underline:hover:before": { + borderBottomColor: "#ffffff", + }, + "& .MuiInput-underline:after": { + borderBottomColor: "#ffffff", + }, + }} + /> + ); + })} + char === "")} + sx={{ + color: "#ffffff", + "&:hover": { + backgroundColor: "#ffffff", + color: "#000000", + }, + marginLeft: 2, + }} + > + + + + + ); + }; + + + + +const ProgressBar = ({ teamScore, maxScore }) => { + const percentage = (teamScore / maxScore) * 100; + + return ( +
+
+
+ ); +}; + +const Percentage = ({ teamScore, maxScore }) => { + const percentage = Math.round((teamScore / maxScore) * 100); // Round to the nearest percent + + return ( +
+ + {percentage}% + + + complete + +
+ ); +}; + +const Progress = ({ teamScore, maxScore, onCharacterSubmit }) => { + return ( + <> + {" "} + + {/* Percentage on the left */} + + + + + {/* ProgressBar and CharacterInput stacked vertically */} + + + + + + {/* White Divider Line */} + + + ); +}; + +export default Progress; diff --git a/src/pages/public/Companion/components/dataverse/Quiz.js b/src/pages/public/Companion/components/dataverse/Quiz.js index eccad799..95a3b062 100644 --- a/src/pages/public/Companion/components/dataverse/Quiz.js +++ b/src/pages/public/Companion/components/dataverse/Quiz.js @@ -1,172 +1,116 @@ import React, { useState } from "react"; import { Typography, Button, TextField, FormControl } from "@material-ui/core"; -import { LocalLeaderboardExample } from "./Leaderboard"; - -const QuizRoom = ({ roomNumber, goBack }) => { - const [answers, setAnswers] = useState(Array(5).fill("")); // Array to hold answers for 5 questions - - const quizData = { - 1: { - questions: [ - "What is the capital of France?", - "What is the largest country by area?", - "Who painted the Mona Lisa?", - "What is the smallest prime number?", - "What is the tallest mountain in the world?" - ], - correctAnswers: [ - "Paris", - "Russia", - "Leonardo da Vinci", - "2", - "Mount Everest" - ] - }, - 2: { - questions: [ - "Which planet is known as the Red Planet?", - "What gas do plants absorb from the atmosphere?", - "What is the chemical symbol for water?", - "Who developed the theory of relativity?", - "What is the speed of light?" - ], - correctAnswers: [ - "Mars", - "Carbon dioxide", - "H2O", - "Albert Einstein", - "299,792,458 m/s" - ] - }, - 3: { - questions: [ - "Who wrote 'To Kill a Mockingbird'?", - "What is the main language spoken in Brazil?", - "Who is known as the Father of Computers?", - "What is the hardest natural substance?", - "What is the boiling point of water in Celsius?" - ], - correctAnswers: [ - "Harper Lee", - "Portuguese", - "Charles Babbage", - "Diamond", - "100" - ] - } - }; - - const handleAnswerChange = (index, value) => { - const newAnswers = [...answers]; - newAnswers[index] = value; - setAnswers(newAnswers); - }; - - const checkAnswers = () => { - const { correctAnswers } = quizData[roomNumber]; - let score = 0; - - answers.forEach((answer, index) => { - if ( - answer.trim().toLowerCase() === - correctAnswers[index].trim().toLowerCase() - ) { - score += 1; - } - }); - - alert(`You scored ${score} out of ${correctAnswers.length}!`); - }; - - // Render the questions based on the room number - const renderQuiz = () => { - const { questions } = quizData[roomNumber]; - - return questions.map((question, index) => ( -
- {question} - - handleAnswerChange(index, e.target.value)} - style={{ - marginTop: "10px" - }} - /> - -
- )); - }; +import DataverseLogo from "../../../../../assets/2024/dataverse/Dataverse.png"; +import TimerDonut from "./Timer"; +import Progress from "./Progress"; +import QuizRoom from "./QuizRoom"; + +const useStyles = { + root: { + position: "relative", + minHeight: "100vh", + background: "linear-gradient(135deg, #0d1b61, #0a143b, #081027, #000000)", + color: "white", + padding: "20px", + textAlign: "center" + }, + heading: { + fontSize: "3rem", + fontWeight: "bold", + marginTop: "0px", + letterSpacing: "0.2em", + textShadow: "0px 0px 4px white" + }, + subheading: { + fontSize: "1.5rem", // Increasing the font size for subheadings + fontWeight: "500" // Optional: make the subheading a bit lighter + }, + text: { + fontSize: "1.2rem" // Make other text a bit larger + }, + infoRow: { + display: "flex", // Align items in a row + width: "200px", // Fixed width for the row + justifyContent: "space-between", // Distribute space between items + marginBottom: "20px", // Space below the row + marginTop: "20px" + }, + label: { + fontSize: "1rem", // Make other text a bit larger + color: "#FFFFFF", // Gray color for labels + fontWeight: "100" // Optional: make labels a bit lighter + }, + value: { + background: "#FFFFFF", // Gradient from white to light purple + WebkitBackgroundClip: "text", // Clip the background to the text + color: "transparent", // Make the text color transparent so the gradient shows through + fontWeight: "700" // Optional: make values bold + } +}; +const LeftHeader = ({ teamName, teamPoints }) => { return ( -
- - Welcome to Quiz Room {roomNumber} +
+ {`Dataverse`} + + DATA - {renderQuiz()} - - + + CHALLENGE + +
+
+ + Team + + + {teamName} + +
+
+ + Points + + + {teamPoints} + +
+
); }; const buttonCardStyle = { + width: "315px", margin: "10px", marginBottom: "200px", padding: "25px 50px", - fontSize: "18px", + fontSize: "20px", + fontFamily: "Audiowide", backgroundColor: "rgba(255, 255, 255, 0.05)", // Transparent background with 10% opacity borderColor: "white", // White borders color: "white", // White text color - height: "400px", // Increased height to make the button taller + height: "300px", // Increased height to make the button taller transition: "transform 0.3s ease, translateY 0.3s ease, opacity 0.3s ease", // Smooth transitions for transform and opacity display: "inline-block", - textAlign: "center", // Center text horizontally + textAlign: "center" // Center text horizontally }; -const button1Style = { - ...buttonCardStyle, - transform: "rotate(-30deg) translateY(100px)", // Start button 1 lower by 100px -}; - -const button3Style = { - ...buttonCardStyle, - transform: "rotate(30deg) translateY(100px)", // Start button 3 lower by 100px -}; - -const button2Style = { - ...buttonCardStyle, - opacity: 1, // Normal opacity for button 2 -}; - -const QuizDashboard = () => { +const QuizDashboard = ({ teamName, teamPoints, startTime, endTime }) => { const [selectedRoom, setSelectedRoom] = useState(null); const renderContent = () => { @@ -180,41 +124,72 @@ const QuizDashboard = () => { } return ( -
- - Quizzes - - - Select a quiz room to begin: - - - - -
+ +
- Enter Quiz Room 3 - + + + +
); }; diff --git a/src/pages/public/Companion/components/dataverse/QuizRoom.js b/src/pages/public/Companion/components/dataverse/QuizRoom.js new file mode 100644 index 00000000..e800c83f --- /dev/null +++ b/src/pages/public/Companion/components/dataverse/QuizRoom.js @@ -0,0 +1,278 @@ +import React, { useState } from "react"; +import { + Typography, + Button, + TextField, + FormControl, + IconButton, + Grid, + Card, + CardContent +} from "@material-ui/core"; +import ArrowBackIcon from "@mui/icons-material/ArrowBack"; + +const QuizRoom = ({ roomNumber, goBack }) => { + const [answers, setAnswers] = useState(Array(5).fill("")); // Array to hold answers for 5 questions + const [selectedOptions, setSelectedOptions] = useState(Array(5).fill(null)); // To track selected options for multiple-choice questions + const [answerStatus, setAnswerStatus] = useState(Array(5).fill(null)); // To track the status of each question (null = not checked, 'correct' or 'incorrect') + + const quizData = { + 1: { + questions: [ + "Which player had the most rebounds in a single game?", + "Which of the following teams scored the most points?", + "Based on historical outcomes, if the Boston Celtics and Charlotte Hornets play against each other, who would you predict would win?", + "Which of the following attributes is most positively correlated with Total Points Scored?", + "What is this SQL query trying to do? \n\nSELECT player \nFROM NBA \nWHERE team = 'NYK' AND total_points >= 20" + ], + questionType: [ + "text", // Free text question + "multiple-choice", // Free text question + "multiple-choice", // Free text question + "multiple-choice", // Free text question + "multiple-choice" // Free text question + ], + correctAnswers: [ + "Victor Wembanyama", + "TOR", + "BOS", + "Field Goal Attempts", + "Retrieve all players who play for the New York Knicks and scored at least 20 points in a game" + ], + options: [ + [], + ["ATL", "TOR", "WAS"], + ["BOS", "CHO"], + ["Field Goal Attempts", "3 Pointer Attempts", "Free Throw Attempts"], + [ + "Retrieve all players who scored at least 20 points in a game", + "Retrieve the total points scored by New York Knicks players who scored more than 20 points in a game", + "Retrieve all players who play for the New York Knicks and scored at least 20 points in a game" + ] + ] // No multiple choice questions for this quiz + }, + 2: { + questions: [ + "Which planet is known as the Red Planet?", + "What gas do plants absorb from the atmosphere?", + "What is the chemical symbol for water?", + "Who developed the theory of relativity?", + "What is the speed of light?" + ], + questionType: [ + "multiple-choice", // Multiple choice question + "multiple-choice", // Multiple choice question + "text", // Free text question + "text", // Free text question + "text" // Free text question + ], + correctAnswers: [ + "Mars", + "Carbon dioxide", + "H2O", + "Albert Einstein", + "299,792,458 m/s" + ], + options: [ + ["Mars", "Earth", "Venus", "Jupiter"], + ["Oxygen", "Carbon dioxide", "Nitrogen", "Hydrogen"], + [], // No options for this text question + [], // No options for this text question + [] // No options for this text question + ] + }, + 3: { + questions: [ + "Which planet is known as the Red Planet?", + "What gas do plants absorb from the atmosphere?", + "What is the chemical symbol for water?", + "Who developed the theory of relativity?", + "What is the speed of light?" + ], + questionType: [ + "multiple-choice", // Multiple choice question + "multiple-choice", // Multiple choice question + "text", // Free text question + "text", // Free text question + "text" // Free text question + ], + correctAnswers: [ + "Mars", + "Carbon dioxide", + "H2O", + "Albert Einstein", + "299,792,458 m/s" + ], + options: [ + ["Mars", "Earth", "Venus", "Jupiter"], + ["Oxygen", "Carbon dioxide", "Nitrogen", "Hydrogen"], + [], // No options for this text question + [], // No options for this text question + [] // No options for this text question + ] + } + }; + + const handleAnswerChange = (index, value) => { + const newAnswers = [...answers]; + newAnswers[index] = value; + setAnswers(newAnswers); + }; + + const handleMultipleChoiceAnswer = (index, option) => { + const newSelectedOptions = [...selectedOptions]; + newSelectedOptions[index] = option; + setSelectedOptions(newSelectedOptions); + const newAnswers = [...answers]; + newAnswers[index] = option; + setAnswers(newAnswers); + }; + + const checkAnswers = () => { + const { correctAnswers } = quizData[roomNumber]; + const newAnswerStatus = answers.map((answer, index) => { + if (answer.trim().toLowerCase() === correctAnswers[index].trim().toLowerCase()) { + return "correct"; // Correct answer + } else { + return "incorrect"; // Incorrect answer + } + }); + setAnswerStatus(newAnswerStatus); + }; + + // Render the questions based on the room number + const renderQuiz = () => { + const { questions, questionType, options } = quizData[roomNumber]; + + return questions.map((question, index) => { + const questionStatus = answerStatus[index]; + const isCorrect = questionStatus === "correct"; + const isIncorrect = questionStatus === "incorrect"; + + return ( + + + + {question.split("\n").map((part, i) => ( + + {part} + {i < question.split("\n").length - 1 &&
} +
+ ))} +
+ + {questionType[index] === "multiple-choice" ? ( + + {options[index].map((option, i) => ( + + + + ))} + + ) : ( + + handleAnswerChange(index, e.target.value)} + style={{ + marginTop: "10px", + width: "100%" + }} + /> + + )} +
+
+ ); + }); + }; + + return ( +
+ + + + + + Quiz {roomNumber} + + + {renderQuiz()} + + +
+ ); +}; + +export default QuizRoom; diff --git a/src/pages/public/Companion/components/dataverse/Timer.js b/src/pages/public/Companion/components/dataverse/Timer.js new file mode 100644 index 00000000..a62093a4 --- /dev/null +++ b/src/pages/public/Companion/components/dataverse/Timer.js @@ -0,0 +1,102 @@ +import React, { useState, useEffect } from "react"; + +const TimerDonut = ({ startTime, endTime }) => { + const [timeLeft, setTimeLeft] = useState(0); + const totalDuration = endTime.getTime() - startTime.getTime(); + + useEffect(() => { + const timer = setInterval(() => { + const now = new Date(); + const difference = endTime.getTime() - now.getTime(); + setTimeLeft(Math.max(0, difference)); + }, 1000); + + return () => clearInterval(timer); + }, [endTime]); + + const progress = 1 - timeLeft / totalDuration; + const size = 100; + const strokeWidth = 10; + const center = size / 2; + const radius = center - strokeWidth / 2; + const circumference = 2 * Math.PI * radius; + + const getColor = () => { + if (progress < 0.5) return "#22c55e"; // Green + if (progress < 0.75) return "#eab308"; // Yellow + if (progress < 0.9) return "#f97316"; // Orange + return "#ef4444"; // Red + }; + + const minutes = Math.floor(timeLeft / 60000); + const seconds = Math.floor((timeLeft % 60000) / 1000); + + const containerStyle = { + position: "relative", + width: "100%", + height: "300px", + backgroundColor: "rgba(255, 255, 255, 0.1)", + backdropFilter: "blur(10px)", + borderRadius: "8px", + boxShadow: "0 4px 6px rgba(0, 0, 0, 0.1)", + display: "flex", + alignItems: "center", + justifyContent: "center", + border: "1px solid white", // Added 2px white border + }; + + const svgStyle = { + width: "80%", + height: "80%", + }; + + const textStyle = { + position: "absolute", + inset: "0", + display: "flex", + alignItems: "center", + justifyContent: "center", + fontSize: "2rem", + fontWeight: "bold", + color: "white", + }; + + return ( +
+ + {/* Background Circle */} + + {/* Progress Circle with Smooth Animation */} + + +
+ {`${minutes.toString().padStart(2, "0")}:${seconds + .toString() + .padStart(2, "0")}`} +
+
+ ); +}; + +export default TimerDonut; From 754d54b36e13639a987df480e4534f8fbf9dd9a4 Mon Sep 17 00:00:00 2001 From: michaelcui Date: Sun, 24 Nov 2024 06:25:54 -0800 Subject: [PATCH 3/3] conflict resolving --- .../Companion/components/dataverse/QuizRoom.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/pages/public/Companion/components/dataverse/QuizRoom.js b/src/pages/public/Companion/components/dataverse/QuizRoom.js index a16e65fa..4132fe0d 100644 --- a/src/pages/public/Companion/components/dataverse/QuizRoom.js +++ b/src/pages/public/Companion/components/dataverse/QuizRoom.js @@ -139,6 +139,7 @@ const QuizRoom = ({ const { correctAnswers, questions } = quizData[roomNumber]; + const newAnswerStatus = [...answerStatus]; // Copy the current answerStatus array try { const response = await fetchBackend( @@ -160,6 +161,9 @@ const QuizRoom = ({ const question = questions[index]; const isCorrect = answer.trim().toLowerCase() === correctAnswers[index].trim().toLowerCase(); + // Update the status for this question + newAnswerStatus[index] = isCorrect ? "correct" : "incorrect"; + // Award points only if the question hasn't been answered correctly before if (isCorrect && !completedQuestions.includes(question)) { score += 1; @@ -167,6 +171,9 @@ const QuizRoom = ({ } }); + // Update the answerStatus state + setAnswerStatus(newAnswerStatus); + if (score > 0) { const updateResponse = await fetchBackend( "/team/points", @@ -180,7 +187,6 @@ const QuizRoom = ({ false ); - // NOTE: using the scannedQRs field to store already answered correctly questions const addQuestions = await fetchBackend( "/team/addQuestions", "put", @@ -192,10 +198,6 @@ const QuizRoom = ({ }, false ); - - alert(`Team points updated successfully: ${updateResponse.updatedPoints}`); - } else { - alert("No new points awarded :("); } } catch (error) { console.error("Error updating team points:", error); @@ -203,6 +205,7 @@ const QuizRoom = ({ } }; + // Render the questions based on the room number const renderQuiz = () => { const {