diff --git a/package.json b/package.json
index 50646899a1..23b182eaa1 100644
--- a/package.json
+++ b/package.json
@@ -16,9 +16,13 @@
"react-helmet": "^6.1.0",
"react-icons": "^4.3.1",
"react-organizational-chart": "^2.1.1",
- "react-router-dom": "6",
+ "react-redux": "^8.0.1",
+ "react-router-dom": "^6.3.0",
"react-scripts": "5.0.0",
"react-shimmer-effect": "^1.0.9",
+ "redux": "^4.2.0",
+ "redux-persist": "^6.0.0",
+ "reselect": "^4.1.5",
"web-vitals": "^2.1.0"
},
"scripts": {
diff --git a/src/common/routing/RouteDefs.jsx b/src/common/routing/RouteDefs.jsx
index 2311caed61..9e64fb2533 100644
--- a/src/common/routing/RouteDefs.jsx
+++ b/src/common/routing/RouteDefs.jsx
@@ -25,11 +25,11 @@ const RouteDefs = () => {
} />
} />
-
+
);
};
-export default RouteDefs;
+export default RouteDefs;
\ No newline at end of file
diff --git a/src/meta/play-meta.js b/src/meta/play-meta.js
index 6b6e696209..e3fc98a34e 100644
--- a/src/meta/play-meta.js
+++ b/src/meta/play-meta.js
@@ -14,6 +14,7 @@ import {
ExpandingCards,
AnalogClock,
PasswordGenerator,
+ Quizeo,
WhyTypescript,
NetlifyCardGame,
RegistrationForm,
@@ -233,8 +234,22 @@ export const plays = [
blog: "",
video: "",
featured: true,
+
+ }, {
+ id: 'pl-quizeo',
+ name: 'Quizeo',
+ description: 'Quizeo is a react app to play quiz about your favourite movies and series.',
+ component: () => {return },
+ path: '/plays/quizeo',
+ level: 'Advanced',
+ tags: 'React-router,Hooks,react-redux,reselect',
+ github: 'vasantisuthar',
+ cover: '',
+ blog: 'https://vasantisuthar.hashnode.dev/',
+ video: '',
+ language: 'js'
},
- {
+ {
id: "pl-password-generator",
name: "Password Generator",
description:
diff --git a/src/plays/index.js b/src/plays/index.js
index 213051c72f..222b427086 100644
--- a/src/plays/index.js
+++ b/src/plays/index.js
@@ -21,3 +21,5 @@ export { default as RegistrationForm } from "plays/registration-form/Registratio
export { default as Calendar } from "plays/calendar/Calendar";
export { default as FunQuiz } from "plays/fun-quiz/FunQuiz";
export { default as TicTacToeGame } from "plays/tic-tac-toe-game/TicTacToeGame";
+export { default as Quizeo } from 'plays/quizeo/src/Quizeo';
+//add export here
diff --git a/src/plays/quizeo/Readme.md b/src/plays/quizeo/Readme.md
new file mode 100644
index 0000000000..60157bf7d7
--- /dev/null
+++ b/src/plays/quizeo/Readme.md
@@ -0,0 +1,15 @@
+# Quizeo
+
+Quizeo is a react fun project to play quiz around favourite movies and series, if you have watched.
+
+## What you will learn
+The app demonstrates
+- the use of reusable components, shows you how to divide your react app into components
+- use of react-redux
+- use of react-redux with hooks
+- use of reselect for better memoization and cache management
+- use of ES6 features
+
+The app uses redux store to store the state and data of the app globally and is fetched with the help of selectors 'react-reselect' to implement memoization to the app. Also each component contains its own CSS for easy implementation of design.
+
+Happy learning!
\ No newline at end of file
diff --git a/src/plays/quizeo/cover.png b/src/plays/quizeo/cover.png
new file mode 100644
index 0000000000..827de057f2
Binary files /dev/null and b/src/plays/quizeo/cover.png differ
diff --git a/src/plays/quizeo/src/Quizeo.jsx b/src/plays/quizeo/src/Quizeo.jsx
new file mode 100644
index 0000000000..5af714da17
--- /dev/null
+++ b/src/plays/quizeo/src/Quizeo.jsx
@@ -0,0 +1,42 @@
+import { getPlayById } from 'meta/play-meta-util';
+import PlayHeader from 'common/playlists/PlayHeader';
+import { store,persistor } from './redux/store';
+import { useEffect } from 'react';
+import { setScore, setQuestionNo } from "./redux/questions/questions-action";
+import Directory from "./components/directory/directory.component";
+import Header from "./components/header/header.component";
+import { Provider} from 'react-redux';
+import { PersistGate } from 'redux-persist/integration/react';
+import './quizeo.css'
+
+function Quizeo(props) {
+ // Do not remove the below lines.
+ // The following code is to fetch the current play from the URL
+ const { id } = props;
+ const play = getPlayById(id);
+
+ // Your Code Start below.
+ useEffect(() =>{
+ store.dispatch(setScore());
+ store.dispatch(setQuestionNo());
+ })
+ return (
+ <>
+
+
+
{dispatch(displayQuestionComponent(linkUrl)); dispatch(isClicked())}}>
+
{title}
+
+
+ );
+}
+
+export default MenuItem;
\ No newline at end of file
diff --git a/src/plays/quizeo/src/components/questions/questions.component.js b/src/plays/quizeo/src/components/questions/questions.component.js
new file mode 100644
index 0000000000..0a0b2533a2
--- /dev/null
+++ b/src/plays/quizeo/src/components/questions/questions.component.js
@@ -0,0 +1,59 @@
+import React from "react";
+import { useSelector, useDispatch } from "react-redux";
+import { ScoreModel } from "../../pages/score-page/score.component";
+import { addScore,showModel } from "../../redux/questions/questions-action";
+import { increaseQuestionNo } from "../../redux/questions/questions-action";
+import { selectQuestionNo, selectHiddenState } from "../../redux/movie/movieSelector";
+
+import './questions.styles.css';
+
+const Questions = (collection) => {
+ const counter = useSelector(selectQuestionNo);
+ const hidden = useSelector(selectHiddenState);
+ const dispatch = useDispatch();
+ let obj;
+ return (
+
+ {Object.keys(collection).map((item,i) => (
+
+ {/* movie title */}
+
+ {collection[item].title}
+
+
+ {/* question */}
+
+ {counter + 1}.{collection[item].questions[counter].question}
+
+
+ {/* options */}
+
+ {Object.keys(collection[item].questions[counter].options).map((option, i) =>(
+ {
+ obj = {
+ answer :e.target.value,
+ correct : collection[item].questions[counter].answer
+ }
+ }}
+ >
+ {collection[item].questions[counter].options[option]}
+
+ ))}
+
+ {counter === collection[item].questions.length-1 ?
+ {dispatch(addScore(obj));dispatch(showModel())}} >submit :
+ {dispatch(addScore(obj)); dispatch(increaseQuestionNo())}}>Next }
+
+
+
+ ))}
+ {hidden ? null:
}
+
+ );
+}
+
+
+export default Questions;
\ No newline at end of file
diff --git a/src/plays/quizeo/src/components/questions/questions.styles.css b/src/plays/quizeo/src/components/questions/questions.styles.css
new file mode 100644
index 0000000000..13f461ee3f
--- /dev/null
+++ b/src/plays/quizeo/src/components/questions/questions.styles.css
@@ -0,0 +1,113 @@
+.quizeo .question-container{
+ display: flex;
+ margin-left: 2.25rem;
+ margin-right: 2.25rem;
+ text-align: center;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+}
+
+.quizeo .question-background{
+ opacity: 0.5;
+}
+
+.quizeo .question-model{
+ margin-top:-4%;
+ width: 50%;
+}
+
+.quizeo .category-title{
+ display: inline-block;
+ position: relative;
+ font-size: 2.25rem;
+ line-height: 2.5rem;
+ text-align: center;
+}
+
+.quizeo .category-title::before{
+ content:"";
+ display:block;
+ position: absolute;
+ background-color: #c12893;
+ top: -0.25rem;
+ right: -0.25rem;
+ bottom: -0.25rem;
+ left: -0.25rem;
+ transform: rotate(-3deg);
+}
+
+
+.quizeo .title{
+ position: relative;
+ color: #ffffff;
+}
+
+.quizeo .questions-section{
+ background-color: #d8e2f7;
+ margin-top: 2rem;
+ border-radius: 0.75rem;
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
+}
+
+.quizeo .question-title{
+ padding-left: 0.75rem;
+ padding-right: 0.75rem;
+ padding-top: 3rem;
+ padding-bottom: 3rem;
+ color: #312E81;
+ font-size: 1.5rem;
+ line-height: 2rem;
+ font-weight: 600;
+}
+
+.quizeo .options-section{
+ margin-left: 1rem;
+ margin-right: 1rem;
+ text-align: center;
+}
+
+.quizeo .option-button{
+ padding-top: 0.75rem;
+ border:none;
+ padding-bottom: 0.75rem;
+ margin: 1rem;
+ background-color: #3B82F6;
+ color: #ffffff;
+ font-size: 1.125rem;
+ line-height: 1.75rem;
+ font-weight: 500;
+ text-align: center;
+ text-transform: uppercase;
+ width: 13rem;
+ border-radius: 9999px;
+ cursor: pointer;
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
+}
+
+.quizeo .option-button:hover{
+ background-color: #2563EB;
+}
+
+.quizeo .option-button:active{
+ background-color: #2e2b77;
+}
+
+.quizeo .option-button:focus{
+ outline: 0;
+ background-color: #2e2b77;
+ border : 2px solid #93C5FD;
+}
+
+.quizeo .submit-answer{
+ border:none;
+ padding: 0.5rem;
+ margin:4%;
+ color: #fff;
+ background-color: #10B981;
+ font-weight: 500;
+ font-size: 1.2rem;
+ width: 9rem;
+ border-radius: 0.5rem;
+}
\ No newline at end of file
diff --git a/src/plays/quizeo/src/data/movie.data.jsx b/src/plays/quizeo/src/data/movie.data.jsx
new file mode 100644
index 0000000000..830160c489
--- /dev/null
+++ b/src/plays/quizeo/src/data/movie.data.jsx
@@ -0,0 +1,254 @@
+const movie_data = {
+ avengers : {
+ id: 1,
+ title : "Avengers",
+ total : 5,
+ questions:[
+ {
+ id:1,
+ question:"How many rings does Captain America's shield have?",
+ options:{
+ "a": 3,
+ "b": 2,
+ "c": 4,
+ "d": 5
+ },
+ answer : 2
+ },
+ {
+ id:2,
+ question:"Who was the last holder of the Space Stone before Thanos claims it for his Infinity Gauntlet?",
+ options:{
+ "a": "Thor",
+ "b": "Loki",
+ "c": "The Collector",
+ "d": "Tony stark"
+ },
+ answer : "Loki"
+ },
+ {
+ id:3,
+ question:"What is the real name of the Black Panther?",
+ options:{
+ "a":"T'Challa",
+ "b": "M'Baku",
+ "c": "N'Jadaka",
+ "d": "N'Jobu"
+ },
+ answer : "T'Challa"
+ },
+ {
+ id:4,
+ question:"Who is killed by Loki in the Avengers?",
+ options:{
+ "a": "Maria Hill",
+ "b": "Nick Fury",
+ "c": "Agent Coulson",
+ "d": "Doctor Erik Selvig"
+ },
+ answer : "Agent Coulson"
+ },
+ {
+ id:5,
+ question:"What is the name of Thor’s hammer?",
+ options:{
+ "a": "Vanir",
+ "b": "Mjolnir",
+ "c": "Aesir",
+ "d": "Norn"
+ },
+ answer : "Mjolnir"
+ }
+ ]
+ },
+ moneyheist :{
+ id: 2,
+ title : "Money Heist",
+ total : 5,
+ questions:[
+
+ {
+ id:1,
+ question:" How long did the professor take to prepare for the robbery?",
+ options:{
+ "a": "months",
+ "b": "weeks",
+ "c": "days",
+ "d": "years"
+ },
+ answer : "years"
+ },
+ {
+ id:2,
+ question:"How many people did the professor recruit to help him carry out his plan?",
+ options:{
+ "a": "seven",
+ "b": "six",
+ "c": "eight",
+ "d": "nine"
+ },
+ answer : "eight"
+ },
+ {
+ id:3,
+ question:"In which country does Raquel track the Professor after the first heist?",
+ options:{
+ "a": "Philippines",
+ "b": "Thailand",
+ "c": "Portugal",
+ "d": "Clark"
+ },
+ answer : "Philippines"
+ },
+ {
+ id:4,
+ question:"The whole idea and plan of the heist was whose?",
+ options:{
+ "a": "The professor's father",
+ "b": "Berlin",
+ "c": "Professor",
+ "d": "Palermo"
+ },
+ answer : "The professor's father"
+ },
+ {
+ id:5,
+ question:"How much money were the Robbers able to print?",
+ options:{
+ "a": "976 million Euros",
+ "b": "956 million Euros",
+ "c": "967 million Euros",
+ "d": "984 million Euros"
+ },
+ answer : "984 million Euros"
+ }
+
+ ]
+ },
+ friends:{
+ id:3,
+ title: "Friends",
+ total : 5,
+ questions:[
+ {
+ id:1,
+ question:"How many sisters does Joey have?",
+ options:{
+ "a": 3,
+ "b": 2,
+ "c": 4,
+ "d": 7
+ },
+ answer : 7
+ },
+ {
+ id:2,
+ question:"What is the name of Joey’s character in the commercial for opening milk cartons?",
+ options:{
+ "a": "Mak",
+ "b": "Mark",
+ "c": "Kevin",
+ "d": "Drake"
+ },
+ answer : "Kevin"
+ },
+ {
+ id:3,
+ question:"What is the name of Joey’s acting agent?",
+ options:{
+ "a": "Andrea",
+ "b": "Estelle",
+ "c": "Martha",
+ "d": "Carole"
+ },
+ answer : "Estelle"
+ },
+ {
+ id:4,
+ question:"Phoebe has a twin sister. What's her name?",
+ options:{
+ "a": "Ursula",
+ "b": "Scalet",
+ "c": "Sharon",
+ "d": "Rita"
+ },
+ answer : "Ursula"
+ },
+ {
+ id:5,
+ question:"Who's wearing this turkey on their head?",
+ options:{
+ "a": "Pheobe",
+ "b": "Joey",
+ "c": "Monica",
+ "d": "Chandler"
+ },
+ answer : "Monica"
+ }
+ ]
+ },
+ squidgame:{
+ id:4,
+ title: "Squid game",
+ total : 5,
+ questions:[
+ {
+ id:1,
+ question:"How many contestants show up to play Squid Game?",
+ options:{
+ "a": 453,
+ "b": 456,
+ "c": 458,
+ "d": 452
+ },
+ answer : 456
+ },
+ {
+ id:2,
+ question:"What shape did the old man carve in the Honeycomb challenge?",
+ options:{
+ "a": "triangle",
+ "b": "circle",
+ "c": "star",
+ "d": "umbrella"
+ },
+ answer : "star"
+ },
+ {
+ id:3,
+ question:"Who was Hwang Jun-ho looking for?",
+ options:{
+ "a": "His younger brother",
+ "b": "His mother",
+ "c": "His father",
+ "d": "His older brother"
+ },
+ answer : "His older brother"
+ },
+ {
+ id:4,
+ question:"How many games are in the competition?",
+ options:{
+ "a": 6,
+ "b": 7,
+ "c": 8,
+ "d": 5
+ },
+ answer : 6
+ },
+ {
+ id:5,
+ question:"Why did Gi-Hun give his daughter a gift?",
+ options:{
+ "a": "It was her birthday",
+ "b": "It was christmas",
+ "c": "It was New Year",
+ "d": "It was a festival"
+ },
+ answer : "It was her birthday"
+ }
+ ]
+ }
+}
+
+export default movie_data;
diff --git a/src/plays/quizeo/src/pages/moviePage/moviePage.component.js b/src/plays/quizeo/src/pages/moviePage/moviePage.component.js
new file mode 100644
index 0000000000..de297821fc
--- /dev/null
+++ b/src/plays/quizeo/src/pages/moviePage/moviePage.component.js
@@ -0,0 +1,18 @@
+import React from "react";
+import { useSelector } from 'react-redux'
+import { selectMovieDataSection } from "../../redux/movie/movieSelector";
+import Questions from "../../components/questions/questions.component";
+
+import '../../quizeo.css'
+
+const MoviePage = ({categoryId}) => {
+ console.log(categoryId);
+ const collection = useSelector(selectMovieDataSection(categoryId))
+ return (
+
+
+
+ );
+}
+
+export default MoviePage;
diff --git a/src/plays/quizeo/src/pages/score-page/score.component.js b/src/plays/quizeo/src/pages/score-page/score.component.js
new file mode 100644
index 0000000000..2879d30aa9
--- /dev/null
+++ b/src/plays/quizeo/src/pages/score-page/score.component.js
@@ -0,0 +1,25 @@
+import React from "react"
+import { useSelector, useDispatch} from "react-redux"
+import { showModel,setScore, setQuestionNo, isClicked } from "../../redux/questions/questions-action";
+import { selectScore } from "../../redux/movie/movieSelector";
+import './score.styles.css';
+
+export const ScoreModel = () => {
+ var score = useSelector(selectScore);
+ const dispatch = useDispatch();
+ return(
+
+
+ dispatch(showModel())}>x
+
🎉Your score is {score}
+ {
+ dispatch(showModel());
+ dispatch(setScore());
+ dispatch(isClicked());
+ dispatch(setQuestionNo());
+ }}>Play again
+
+
+ )
+}
\ No newline at end of file
diff --git a/src/plays/quizeo/src/pages/score-page/score.styles.css b/src/plays/quizeo/src/pages/score-page/score.styles.css
new file mode 100644
index 0000000000..441f40b9cf
--- /dev/null
+++ b/src/plays/quizeo/src/pages/score-page/score.styles.css
@@ -0,0 +1,48 @@
+.quizeo .score-container{
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.quizeo .score-section{
+ display: flex;
+ position: absolute;
+ top:25%;
+ background-color: #ffffff;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ width: 24rem;
+ height: 16rem;
+ border-radius: 1.5rem;
+}
+
+.quizeo .score-close{
+ border:none;
+ position: absolute;
+ top: 1rem;
+ right: 2rem;
+ font-size: 1.875rem;
+ line-height: 2.25rem;
+ color: black;
+ background-color: white;
+}
+
+.quizeo .score-section h1{
+ font-size: 1.5rem;
+ line-height: 2rem;
+ font-weight: 500;
+}
+
+.quizeo .play-button{
+ color:white;
+ border:none;
+ padding: 0.75rem;
+ background-color: rgb(110, 216, 216);
+ margin-top: 1.75rem;
+ margin-bottom: 1.75rem;
+ margin-left: 5rem;
+ margin-right: 5rem;
+ border-radius: 1.5rem;
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
+}
\ No newline at end of file
diff --git a/src/plays/quizeo/src/quizeo.css b/src/plays/quizeo/src/quizeo.css
new file mode 100644
index 0000000000..6375c57f58
--- /dev/null
+++ b/src/plays/quizeo/src/quizeo.css
@@ -0,0 +1,6 @@
+.quizeo h1{
+ font-family:sans-serif;
+ color:#3D56B2;
+ text-decoration: none;
+ text-align: center;
+}
diff --git a/src/plays/quizeo/src/redux/directory/directory-reducer.js b/src/plays/quizeo/src/redux/directory/directory-reducer.js
new file mode 100644
index 0000000000..ea82baabe9
--- /dev/null
+++ b/src/plays/quizeo/src/redux/directory/directory-reducer.js
@@ -0,0 +1,38 @@
+const INITIAL_STATE = {
+ sections: [
+ {
+ id:1,
+ title:"Avengers",
+ imageUrl: "https://i.ibb.co/XWP17ND/avengers-resize.jpg",
+ linkUrl:'avengers'
+ },
+ {
+ id:2,
+ title:"Money Heist",
+ imageUrl: "https://i.ibb.co/Jtw5wN9/money-heist.jpg",
+ linkUrl:'moneyheist'
+ },
+ {
+ id:3,
+ title:"Friends",
+ imageUrl: "https://i.ibb.co/s9XCV3H/friends.jpg",
+ linkUrl:'friends'
+ },
+ {
+ id:4,
+ title:"Squid Game",
+ imageUrl: "https://i.ibb.co/Qr9ssY3/squid-game.jpg",
+ linkUrl:'squidgame'
+ }
+ ]
+}
+
+
+const directoryReducer = (state = INITIAL_STATE, action) =>{
+ switch(action.type){
+ default:
+ return {...state};
+ }
+}
+
+export default directoryReducer;
\ No newline at end of file
diff --git a/src/plays/quizeo/src/redux/directory/directory-selectors.js b/src/plays/quizeo/src/redux/directory/directory-selectors.js
new file mode 100644
index 0000000000..6f539d625f
--- /dev/null
+++ b/src/plays/quizeo/src/redux/directory/directory-selectors.js
@@ -0,0 +1,8 @@
+import { createSelector } from "reselect";
+
+const selectDirectory = (state) => state.directory;
+
+export const selectDirectorySection = createSelector(
+ [selectDirectory],
+ directory => directory.sections
+)
diff --git a/src/plays/quizeo/src/redux/movie/movie-reducer.js b/src/plays/quizeo/src/redux/movie/movie-reducer.js
new file mode 100644
index 0000000000..93bfeb5011
--- /dev/null
+++ b/src/plays/quizeo/src/redux/movie/movie-reducer.js
@@ -0,0 +1,56 @@
+import movie_data from "../../data/movie.data";
+import { QuestionTypes } from "../questions/question-types";
+import { calculateScore } from "../questions/question.utils";
+
+const INITIAL_STATE = {
+ collection:movie_data,
+ hidden: true,
+ questionNo : 0,
+ score:0,
+ questionIndex : '',
+ setClicked: false,
+}
+
+const movieReducer = (state = INITIAL_STATE,action) =>{
+ switch(action.type){
+ case QuestionTypes.ADD_SCORE:
+ return{
+ ...state,
+ score: calculateScore(state.score, action.payload)
+ }
+ case QuestionTypes.SHOW_MODEL:
+ return{
+ ...state,
+ hidden : !state.hidden
+ }
+ case QuestionTypes.SET_SCORE:
+ return{
+ ...state,
+ score: 0
+ }
+ case QuestionTypes.INCREASE_QUESTION_NO:
+ return{
+ ...state,
+ questionNo : state.questionNo + 1
+ }
+ case QuestionTypes.SET_QUESTION_NO:
+ return{
+ ...state,
+ questionNo: 0
+ }
+ case QuestionTypes.DISPLAY_QUESTION_COMPONENT:
+ return{
+ ...state,
+ questionIndex: action.payload
+ }
+ case QuestionTypes.IS_CLICKED:
+ return{
+ ...state,
+ setClicked: !state.setClicked
+ }
+ default:
+ return {...state}
+ }
+}
+
+export default movieReducer;
diff --git a/src/plays/quizeo/src/redux/movie/movieSelector.js b/src/plays/quizeo/src/redux/movie/movieSelector.js
new file mode 100644
index 0000000000..530e7f4226
--- /dev/null
+++ b/src/plays/quizeo/src/redux/movie/movieSelector.js
@@ -0,0 +1,39 @@
+import { createSelector } from "reselect";
+import memoize from 'lodash.memoize';
+
+const selectMovie = (state) => state.movie;
+
+export const selectQuestionIndex = createSelector(
+ [selectMovie],
+ movie => movie.questionIndex
+)
+
+export const selectQuestionNo = createSelector(
+ [selectMovie],
+ movie => movie.questionNo
+)
+
+export const selectHiddenState = createSelector(
+ [selectMovie],
+ movie => movie.hidden
+)
+
+export const selectScore = createSelector(
+ [selectMovie],
+ movie => movie.score
+)
+
+export const selectClickedAction = createSelector(
+ [selectMovie],
+ movie => movie.setClicked
+)
+
+export const selectMovieData = createSelector(
+ [selectMovie],
+ movie => movie.collection
+)
+
+export const selectMovieDataSection = memoize(collectionUrlParam => createSelector(
+ [selectMovieData],
+ collection => collection[collectionUrlParam]
+))
diff --git a/src/plays/quizeo/src/redux/questions/question-types.js b/src/plays/quizeo/src/redux/questions/question-types.js
new file mode 100644
index 0000000000..6c394af19d
--- /dev/null
+++ b/src/plays/quizeo/src/redux/questions/question-types.js
@@ -0,0 +1,9 @@
+export const QuestionTypes = {
+ INCREASE_QUESTION_NO: 'INCREASE_QUESTION_NO',
+ ADD_SCORE : 'ADD_SCORE',
+ SHOW_MODEL : 'SHOW_MODEL',
+ SET_SCORE : 'SET_SCORE',
+ SET_QUESTION_NO: 'SET_QUESTION_NO',
+ DISPLAY_QUESTION_COMPONENT : 'DISPLAY_QUESTION_COMPONENT',
+ IS_CLICKED: 'IS_CLICKED'
+}
\ No newline at end of file
diff --git a/src/plays/quizeo/src/redux/questions/question.utils.js b/src/plays/quizeo/src/redux/questions/question.utils.js
new file mode 100644
index 0000000000..292613c710
--- /dev/null
+++ b/src/plays/quizeo/src/redux/questions/question.utils.js
@@ -0,0 +1,11 @@
+
+export const calculateScore = (score, answer) =>{
+ if(answer.answer){
+ if(answer.answer === answer.correct){
+ score = score + 1
+ return score;
+ }else{
+ return score;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/plays/quizeo/src/redux/questions/questions-action.js b/src/plays/quizeo/src/redux/questions/questions-action.js
new file mode 100644
index 0000000000..5b15e80b60
--- /dev/null
+++ b/src/plays/quizeo/src/redux/questions/questions-action.js
@@ -0,0 +1,31 @@
+import { QuestionTypes } from "./question-types";
+
+export const increaseQuestionNo = () =>({
+ type:QuestionTypes.INCREASE_QUESTION_NO
+})
+
+export const addScore = (answer) => ({
+ type:QuestionTypes.ADD_SCORE,
+ payload : answer
+})
+
+export const showModel = () => ({
+ type: QuestionTypes.SHOW_MODEL
+})
+
+export const setScore = () => ({
+ type:QuestionTypes.SET_SCORE
+})
+
+export const setQuestionNo = () => ({
+ type:QuestionTypes.SET_QUESTION_NO
+})
+
+export const displayQuestionComponent = (linkUrl) =>({
+ type: QuestionTypes.DISPLAY_QUESTION_COMPONENT,
+ payload: linkUrl
+})
+
+export const isClicked = () => ({
+ type:QuestionTypes.IS_CLICKED
+})
\ No newline at end of file
diff --git a/src/plays/quizeo/src/redux/root-reducer.js b/src/plays/quizeo/src/redux/root-reducer.js
new file mode 100644
index 0000000000..c27757f988
--- /dev/null
+++ b/src/plays/quizeo/src/redux/root-reducer.js
@@ -0,0 +1,17 @@
+import { combineReducers } from "redux";
+import { persistReducer } from "redux-persist";
+import storage from "redux-persist/lib/storage";
+import directoryReducer from "./directory/directory-reducer";
+import movieReducer from './movie/movie-reducer';
+// import questionReducer from "./questions/question-reducer";
+const persistConfig = {
+ key:'root',
+ storage
+}
+
+const rootReducer = combineReducers({
+ directory:directoryReducer,
+ movie: movieReducer
+})
+
+export default persistReducer(persistConfig, rootReducer);
\ No newline at end of file
diff --git a/src/plays/quizeo/src/redux/store.js b/src/plays/quizeo/src/redux/store.js
new file mode 100644
index 0000000000..a0921249da
--- /dev/null
+++ b/src/plays/quizeo/src/redux/store.js
@@ -0,0 +1,9 @@
+import { createStore } from "redux";
+import { persistStore } from "redux-persist";
+
+import rootReducer from './root-reducer';
+
+const store = createStore(rootReducer);
+const persistor = persistStore(store);
+
+export {store, persistor};