Skip to content

Commit

Permalink
Merge pull request #20 from SafdarJamal/release/v5.1.0
Browse files Browse the repository at this point in the history
Release v5.1.0
  • Loading branch information
SafdarJamal authored Apr 30, 2021
2 parents dcee5b2 + 8fceef3 commit 97cf506
Show file tree
Hide file tree
Showing 7 changed files with 1,372 additions and 1,260 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,3 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

.eslintcache
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</p>

<p align="center">
QuizApp is a free and open-source quiz application that lets you play fully customize quizzes right in the browser.
QuizApp is a free and open-source quiz application that lets you play fully customized quizzes right in the browser.
</p>

![quiz-app](https://user-images.githubusercontent.com/48409548/104132046-a39e5b80-539c-11eb-9df3-28d52e499a6c.png)
Expand Down
2,577 changes: 1,342 additions & 1,235 deletions package-lock.json

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"name": "quiz-app",
"version": "5.0.0",
"version": "5.1.0",
"private": true,
"author": {
"name": "Safdar Jamal",
"url": "https://safdarjamal.github.io"
},
"homepage": "https://safdarjamal.github.io/quiz-app/",
"dependencies": {
"@testing-library/jest-dom": "^5.11.8",
"@testing-library/react": "^11.2.3",
"@testing-library/user-event": "^12.6.0",
"@testing-library/jest-dom": "^5.12.0",
"@testing-library/react": "^11.2.6",
"@testing-library/user-event": "^12.8.3",
"he": "^1.2.0",
"prop-types": "^15.7.2",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "^4.0.3",
"semantic-ui-css": "^2.4.1",
"semantic-ui-react": "^2.0.1",
"sweetalert2": "^10.13.0"
"semantic-ui-react": "^2.0.3",
"sweetalert2": "^10.16.6"
},
"scripts": {
"start": "react-scripts start",
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>QuizApp - The Ultimate Trivia Quiz</title>
<meta
name="description"
content="QuizApp is a free and open-source quiz application that lets you play fully customize quizzes right in the browser."
content="QuizApp is a free and open-source quiz application that lets you play fully customized quizzes right in the browser."
/>

<!-- Theme Color -->
Expand Down
2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"short_name": "QuizApp",
"name": "QuizApp",
"description": "QuizApp is a free and open-source quiz application that lets you play fully customize quizzes right in the browser.",
"description": "QuizApp is a free and open-source quiz application that lets you play fully customized quizzes right in the browser.",
"icons": [
{
"src": "android-chrome-192x192.png",
Expand Down
29 changes: 18 additions & 11 deletions src/components/Main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Dropdown,
Divider,
Button,
Message
Message,
} from 'semantic-ui-react';

import mindImg from '../../images/mind.svg';
Expand All @@ -17,21 +17,21 @@ import {
NUM_OF_QUESTIONS,
DIFFICULTY,
QUESTIONS_TYPE,
COUNTDOWN_TIME
COUNTDOWN_TIME,
} from '../../constants';
import { shuffle } from '../../utils';

import Offline from '../Offline';

const Main = ({ startQuiz }) => {
const [category, setCategory] = useState(null);
const [numOfQuestions, setNumOfQuestions] = useState(null);
const [difficulty, setDifficulty] = useState(null);
const [questionsType, setQuestionsType] = useState(null);
const [category, setCategory] = useState('0');
const [numOfQuestions, setNumOfQuestions] = useState(5);
const [difficulty, setDifficulty] = useState('0');
const [questionsType, setQuestionsType] = useState('0');
const [countdownTime, setCountdownTime] = useState({
hours: null,
minutes: null,
seconds: null
hours: 0,
minutes: 120,
seconds: 0,
});
const [processing, setProcessing] = useState(false);
const [error, setError] = useState(null);
Expand Down Expand Up @@ -87,7 +87,7 @@ const Main = ({ startQuiz }) => {
results.forEach(element => {
element.options = shuffle([
element.correct_answer,
...element.incorrect_answers
...element.incorrect_answers,
]);
});

Expand Down Expand Up @@ -135,6 +135,7 @@ const Main = ({ startQuiz }) => {
selection
name="category"
placeholder="Select Quiz Category"
header="Select Quiz Category"
options={CATEGORIES}
value={category}
onChange={(e, { value }) => setCategory(value)}
Expand All @@ -146,6 +147,7 @@ const Main = ({ startQuiz }) => {
selection
name="numOfQ"
placeholder="Select No. of Questions"
header="Select No. of Questions"
options={NUM_OF_QUESTIONS}
value={numOfQuestions}
onChange={(e, { value }) => setNumOfQuestions(value)}
Expand All @@ -157,6 +159,7 @@ const Main = ({ startQuiz }) => {
selection
name="difficulty"
placeholder="Select Difficulty Level"
header="Select Difficulty Level"
options={DIFFICULTY}
value={difficulty}
onChange={(e, { value }) => setDifficulty(value)}
Expand All @@ -168,6 +171,7 @@ const Main = ({ startQuiz }) => {
selection
name="type"
placeholder="Select Questions Type"
header="Select Questions Type"
options={QUESTIONS_TYPE}
value={questionsType}
onChange={(e, { value }) => setQuestionsType(value)}
Expand All @@ -179,6 +183,7 @@ const Main = ({ startQuiz }) => {
selection
name="hours"
placeholder="Select Hours"
header="Select Hours"
options={COUNTDOWN_TIME.hours}
value={countdownTime.hours}
onChange={handleTimeChange}
Expand All @@ -189,6 +194,7 @@ const Main = ({ startQuiz }) => {
selection
name="minutes"
placeholder="Select Minutes"
header="Select Minutes"
options={COUNTDOWN_TIME.minutes}
value={countdownTime.minutes}
onChange={handleTimeChange}
Expand All @@ -199,6 +205,7 @@ const Main = ({ startQuiz }) => {
selection
name="seconds"
placeholder="Select Seconds"
header="Select Seconds"
options={COUNTDOWN_TIME.seconds}
value={countdownTime.seconds}
onChange={handleTimeChange}
Expand Down Expand Up @@ -227,7 +234,7 @@ const Main = ({ startQuiz }) => {
};

Main.propTypes = {
startQuiz: PropTypes.func.isRequired
startQuiz: PropTypes.func.isRequired,
};

export default Main;

0 comments on commit 97cf506

Please sign in to comment.