{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":702158090,"defaultBranch":"main","name":"React-Quiz-Web-Application","ownerLogin":"NewmanAdesan","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2023-10-08T17:01:27.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/83893239?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1696945173.0","currentOid":""},"activityList":{"items":[{"before":"c805238d19296686fa5bd63c4a868ef1a0808541","after":"905b1e8fc456de51af56e4ed2b5efc623c7d4c1a","ref":"refs/heads/main","pushedAt":"2023-11-01T04:20:45.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"NewmanAdesan","name":null,"path":"/NewmanAdesan","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/83893239?s=80&v=4"},"commit":{"message":"final commit on the application","shortMessageHtmlLink":"final commit on the application"}},{"before":"ae5f08cc2336dc5b7e3b1179c573feb4a588a4e8","after":"c805238d19296686fa5bd63c4a868ef1a0808541","ref":"refs/heads/main","pushedAt":"2023-10-29T23:44:09.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"NewmanAdesan","name":null,"path":"/NewmanAdesan","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/83893239?s=80&v=4"},"commit":{"message":"[FEATURE] Implemented Timer Functionality\n\n**Setting up Timer Functionality:**\n\n1. Created a constant variable GAMETIME to set the number of seconds for the quiz.\n2. Introduced a new state, \time, in the application, initially set to GAMETIME, to track the remaining seconds until the quiz ends.\n3. Added a new action type, update-time in the application reducer function.\n - Checked if the current time (\time state) is equal to zero.\n - If equal to zero, changed the application state to \finished.\n - If not, decremented the \time state by 1 second.\n4. Upon the quiz's start (when the application status is \u0007ctive), utilized the setInterval function to update the \time state every second.\n - Displayed the remaining time to the user in the format {minutes}:{seconds} in a component called Timer beside the Next button component.\n - Utilized the useEffect hook to call setInterval once on component mount.\n - The callback function in setInterval dispatched the update-time action.\n - Included a cleanup function in the useEffect hook to clear the interval when the component unmounts.\n5. When the quiz is restarted, the \time state is reset to GAMETIME.\n\nThis commit message summarizes the implementation of timer functionality in the application, providing a clear and concise overview of the changes made.","shortMessageHtmlLink":"[FEATURE] Implemented Timer Functionality"}},{"before":"e025f9a5e130c597557d8182d0a1138fba0b75a9","after":"ae5f08cc2336dc5b7e3b1179c573feb4a588a4e8","ref":"refs/heads/main","pushedAt":"2023-10-29T20:11:51.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"NewmanAdesan","name":null,"path":"/NewmanAdesan","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/83893239?s=80&v=4"},"commit":{"message":"[FEATURE] Finish Screen Layout and Functionality\n\nWhen the last question has been answered, the FinishScreen Component is displayed which renders a UI that shows user score, current highscore & a button to restart the quiz\n\n**Layout & Style of the Finish Screen:**\n\n1. Added a p element to display the player's score.\n2. Added another p element to display the high score.\n3. Introduced a button element for restarting the quiz.\n4. Applied CSS classes to style the three elements\n\n**Set Score Feedback Functionality:**\n\n1. Passed the points state and \totalPoint variable as a prop to the FinishScreen Component.\n2. Rendered the points props and \totalPoints props in the first p element.\n3. Calculated the score percentage based on points and \totalPoints.\n4. Determined emojis based on the percentage (e.g., >90, >60, >30, <30) for score feedback.\n5. Displayed the chosen emoji & the score percentage in the first p element.\n\n**Setup High Score Functionality:**\n\n1. Added a highscore state, initially set to zero in the initialState object.\n2. When the last question is answered,\n - the Finish button appears.\n - On clicking this Finish button, the \u0007nswered-all-questions action is dispatched, setting the application status to \finished.\n - The functionality of the \u0007nswered-all-question action is updated such that the highscore state is updated if the user's score is greater than the current high score.\n3. Passed the highscore state as a prop to the Finish Screen Component and displayed it in the second p element.\n\n**Restart Quiz Functionality:**\n\n1. Added a new action type, \restart-quiz, to the reducer.\n - Set the status state to \ready.\n - Set the index state to 0.\n - Reset the \u0007nswers state to [null, null, ...].\n - Reset the points state to 0.\n2. Added an onClick attribute to the button element to dispatch the \restart-quiz action.\n\nThis commit message summarizes the code made to implement the Finish Screen layout and functionality, providing a clear and concise overview of the changes.","shortMessageHtmlLink":"[FEATURE] Finish Screen Layout and Functionality"}},{"before":"a039182888e29286a4d3d0018ef845d177c391dc","after":"e025f9a5e130c597557d8182d0a1138fba0b75a9","ref":"refs/heads/main","pushedAt":"2023-10-13T20:01:28.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"NewmanAdesan","name":null,"path":"/NewmanAdesan","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/83893239?s=80&v=4"},"commit":{"message":"Implement the logic for the Next-Question & Previous-Question button","shortMessageHtmlLink":"Implement the logic for the Next-Question & Previous-Question button"}},{"before":"4fddf1b31d9bab8333825f3dfe7495a5d585d852","after":"a039182888e29286a4d3d0018ef845d177c391dc","ref":"refs/heads/main","pushedAt":"2023-10-12T06:56:25.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"NewmanAdesan","name":null,"path":"/NewmanAdesan","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/83893239?s=80&v=4"},"commit":{"message":"feat: Add User Option Selection Feedback and Styling","shortMessageHtmlLink":"feat: Add User Option Selection Feedback and Styling"}},{"before":"f541ae352394b01b85cc76b133f90a27c8922111","after":"4fddf1b31d9bab8333825f3dfe7495a5d585d852","ref":"refs/heads/main","pushedAt":"2023-10-10T18:19:40.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"NewmanAdesan","name":null,"path":"/NewmanAdesan","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/83893239?s=80&v=4"},"commit":{"message":"Implement Question Component with Smooth Option Transitions","shortMessageHtmlLink":"Implement Question Component with Smooth Option Transitions"}},{"before":"6a5e6df86a00c9358b2ec6125554cbb684939166","after":"f541ae352394b01b85cc76b133f90a27c8922111","ref":"refs/heads/main","pushedAt":"2023-10-10T17:02:21.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"NewmanAdesan","name":null,"path":"/NewmanAdesan","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/83893239?s=80&v=4"},"commit":{"message":"feat: Implement Loading, Error, and StartScreen Components\n\n- Display Loading Component during question fetching (status: loading)\n- Show Error Component on loading errors (status: error)\n- Introduce StartScreen Component for welcoming players upon successful question loading","shortMessageHtmlLink":"feat: Implement Loading, Error, and StartScreen Components"}},{"before":"00835c6aab26a5ca0bdd643659d1a8218195ee59","after":"6a5e6df86a00c9358b2ec6125554cbb684939166","ref":"refs/heads/main","pushedAt":"2023-10-10T14:40:33.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"NewmanAdesan","name":null,"path":"/NewmanAdesan","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/83893239?s=80&v=4"},"commit":{"message":"feat: Add quiz questions data from fake API\n\n- Created 'questions.json' with 15 questions, options, correct answers, and points allocation.\n- Used json-server to serve the data at http://localhost:9000/\n- Implemented data fetching in 'App' component using useEffect","shortMessageHtmlLink":"feat: Add quiz questions data from fake API"}},{"before":null,"after":"00835c6aab26a5ca0bdd643659d1a8218195ee59","ref":"refs/heads/main","pushedAt":"2023-10-10T13:39:33.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"NewmanAdesan","name":null,"path":"/NewmanAdesan","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/83893239?s=80&v=4"},"commit":{"message":"first commit","shortMessageHtmlLink":"first commit"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAADpJw4FAA","startCursor":null,"endCursor":null}},"title":"Activity ยท NewmanAdesan/React-Quiz-Web-Application"}