diff --git a/.eslintrc.json b/.eslintrc.json index 9a1c915..c9c9b0c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,24 +1,31 @@ { - "env": { - "browser": true, - "es2021": true - }, - "extends": [ - "eslint:recommended", - "plugin:react/recommended" - ], - "parserOptions": { - "ecmaFeatures": { - "jsx": true + "env": { + "browser": true, + "es2021": true }, - "ecmaVersion": "latest", - "sourceType": "module" - }, - "plugins": [ - "react" - ], - "rules": { - "react/jsx-uses-react": "error", - "react/jsx-uses-vars": "error" - } -} \ No newline at end of file + "extends": [ + "plugin:react/recommended", + "airbnb" + ], + "parserOptions": { + "ecmaFeatures": { + "jsx": true + }, + "ecmaVersion": "latest", + "sourceType": "module" + }, + "plugins": [ + "react" + ], + "rules":{ + "no-restricted-syntax": ["error", "FunctionExpression", "WithStatement", "BinaryExpression[operator='in']"], + "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], + "react/function-component-definition": [ + 2, + { + "namedComponents": "arrow-function", + "unnamedComponents": "arrow-function" + } + ] + } +} diff --git a/README.md b/README.md index 58beeac..48e2965 100644 --- a/README.md +++ b/README.md @@ -1,70 +1,17 @@ -# Getting Started with Create React App +# Getting Started with Amazon Clone App -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). +# User Have to Login in the App -## Available Scripts +Landing Page of App is login Page Where user have to enter login details -In the project directory, you can run: +# Dashboard Page -### `npm start` +if user Logged in Succesfully then Dashboard page will display -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in your browser. +# Dashboard Page Content -The page will reload when you make changes.\ -You may also see any lint errors in the console. +1 There is NavBar Which is Dispalying user Name and Buttons -### `npm test` +2 Firstly on Upper there is slidder in Which all movies are displaying -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -### `npm run build` - -Builds the app for production to the `build` folder.\ -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.\ -Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `npm run eject` - -**Note: this is a one-way operation. Once you `eject`, you can't go back!** - -If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. - -You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). - -### Code Splitting - -This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) - -### Analyzing the Bundle Size - -This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) - -### Making a Progressive Web App - -This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) - -### Advanced Configuration - -This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) - -### Deployment - -This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) - -### `npm run build` fails to minify - -This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) +3 Below Slidder there is Card which is Displaying all Movies \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 4c37640..f39720a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^13.5.0", "bootstrap": "^5.1.3", + "prop-types": "^15.8.1", "react": "^18.2.0", "react-bootstrap": "^2.4.0", "react-dom": "^18.2.0", @@ -21,17 +22,18 @@ "react-router-dom": "^6.3.0", "react-scripts": "5.0.1", "redux": "^4.2.0", + "sweetalert": "^2.1.2", "web-vitals": "^2.1.4" }, "devDependencies": { - "eslint": "^8.20.0", + "eslint": "^7.32.0 || ^8.2.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-prettier": "^8.5.0", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-jsx-a11y": "^6.6.1", + "eslint-plugin-import": "^2.25.3", + "eslint-plugin-jsx-a11y": "^6.5.1", "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-react": "^7.30.1", - "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react": "^7.28.0", + "eslint-plugin-react-hooks": "^4.3.0", "prettier": "2.7.1" } }, @@ -6830,6 +6832,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==" + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -13862,6 +13869,11 @@ "asap": "~2.0.6" } }, + "node_modules/promise-polyfill": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-6.1.0.tgz", + "integrity": "sha512-g0LWaH0gFsxovsU7R5LrrhHhWAWiHRnh1GPrhXnPgYsDkIqjRYUYSZEsej/wtleDrz5xVSIDbeKfidztp2XHFQ==" + }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -15695,6 +15707,15 @@ "boolbase": "~1.0.0" } }, + "node_modules/sweetalert": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/sweetalert/-/sweetalert-2.1.2.tgz", + "integrity": "sha512-iWx7X4anRBNDa/a+AdTmvAzQtkN1+s4j/JJRWlHpYE8Qimkohs8/XnFcWeYHH2lMA8LRCa5tj2d244If3S/hzA==", + "dependencies": { + "es6-object-assign": "^1.1.0", + "promise-polyfill": "^6.0.2" + } + }, "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -22037,6 +22058,11 @@ "is-symbol": "^1.0.2" } }, + "es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==" + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -26911,6 +26937,11 @@ "asap": "~2.0.6" } }, + "promise-polyfill": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-6.1.0.tgz", + "integrity": "sha512-g0LWaH0gFsxovsU7R5LrrhHhWAWiHRnh1GPrhXnPgYsDkIqjRYUYSZEsej/wtleDrz5xVSIDbeKfidztp2XHFQ==" + }, "prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -28272,6 +28303,15 @@ } } }, + "sweetalert": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/sweetalert/-/sweetalert-2.1.2.tgz", + "integrity": "sha512-iWx7X4anRBNDa/a+AdTmvAzQtkN1+s4j/JJRWlHpYE8Qimkohs8/XnFcWeYHH2lMA8LRCa5tj2d244If3S/hzA==", + "requires": { + "es6-object-assign": "^1.1.0", + "promise-polyfill": "^6.0.2" + } + }, "symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", diff --git a/package.json b/package.json index 74e9822..82d0d31 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^13.5.0", "bootstrap": "^5.1.3", + "prop-types": "^15.8.1", "react": "^18.2.0", "react-bootstrap": "^2.4.0", "react-dom": "^18.2.0", @@ -16,6 +17,7 @@ "react-router-dom": "^6.3.0", "react-scripts": "5.0.1", "redux": "^4.2.0", + "sweetalert": "^2.1.2", "web-vitals": "^2.1.4" }, "scripts": { @@ -23,7 +25,8 @@ "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject", - "lint": "eslint src/**/*.js" + "lint": "eslint src/**/*.js", + "lint-fix": "eslint src/**/*.js --fix" }, "eslintConfig": { "extends": [ @@ -44,14 +47,14 @@ ] }, "devDependencies": { - "eslint": "^8.20.0", + "eslint": "^7.32.0 || ^8.2.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-prettier": "^8.5.0", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-jsx-a11y": "^6.6.1", + "eslint-plugin-import": "^2.25.3", + "eslint-plugin-jsx-a11y": "^6.5.1", "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-react": "^7.30.1", - "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react": "^7.28.0", + "eslint-plugin-react-hooks": "^4.3.0", "prettier": "2.7.1" } } diff --git a/src/.prettierrc.json b/src/.prettierrc.json deleted file mode 100644 index f914884..0000000 --- a/src/.prettierrc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "trailingComma": "es5", - "tabWidth": 4, - "semi": true, - "singleQuote": true -} diff --git a/src/Actions/index.js b/src/Actions/index.js deleted file mode 100644 index c314445..0000000 --- a/src/Actions/index.js +++ /dev/null @@ -1,11 +0,0 @@ -import popularMovies from '../FakeApi/PopularMovie'; -// imported FakeApi Data - -export const getMovieData = 'GETMOVIES'; -// Creating A Variable for Action -export const getMoviesFunc = () => { - return { - type: getMovieData, - payload: popularMovies, - }; -}; diff --git a/src/AdminDetail/index.js b/src/AdminDetail/index.js index caf4b86..0266d28 100644 --- a/src/AdminDetail/index.js +++ b/src/AdminDetail/index.js @@ -1,3 +1,3 @@ -// Login Details of the user +// Login Constants of the user export const adminUser = 'vishal'; export const adminPass = 'admin@123'; diff --git a/src/App.js b/src/App.js index 900827d..c291a83 100644 --- a/src/App.js +++ b/src/App.js @@ -1,23 +1,26 @@ -import React, { useState } from 'react'; +import React, { useState, useMemo } from 'react'; // import Packages -import { userContext } from './Context/UserContext'; +import userContext from './Context/UserContext'; // imported Created Context import Routing from './Routing'; import Auth from './Authrization'; // imported Requried Componenets -function App() { -//state for the context - const [loginData,setLoginData] = useState({ - username : '', - password : '', - loggedIn : false +const App = () => { +// state for the context + const [loginData, setLoginData] = useState({ + username: '', + password: '', + loggedIn: false, }); + const AuthContext = useMemo(() => ({ + loginData, setLoginData, + })); return ( // Providing the context value to our App - +
{/* Use for Authrization */} @@ -27,6 +30,6 @@ function App() {
); -} +}; export default App; diff --git a/src/AppView/CssFiles/Slidder.css b/src/AppView/Components/CssFiles/Slidder.css similarity index 54% rename from src/AppView/CssFiles/Slidder.css rename to src/AppView/Components/CssFiles/Slidder.css index e718f71..4965f90 100644 --- a/src/AppView/CssFiles/Slidder.css +++ b/src/AppView/Components/CssFiles/Slidder.css @@ -1,6 +1,8 @@ +/* sub-container of Slidder */ .posterOfSlidder{ height: 600px; } +/* mainn container of slidder */ .mainDivOfSlidder{ height: 600px; } \ No newline at end of file diff --git a/src/AppView/CssFiles/showMovie.css b/src/AppView/Components/CssFiles/showMovie.css similarity index 72% rename from src/AppView/CssFiles/showMovie.css rename to src/AppView/Components/CssFiles/showMovie.css index ad321df..00f1e37 100644 --- a/src/AppView/CssFiles/showMovie.css +++ b/src/AppView/Components/CssFiles/showMovie.css @@ -1,3 +1,4 @@ +/* main sub-container for the card */ .media{ display: flex; flex-direction: column; @@ -9,25 +10,30 @@ position: relative; color: white; } +/* Hover Effect on media container */ .media:hover{ background-color: white; color: black; } +/* A poster use to reduce radius */ .poster{ border-radius: 10px; } +/* use to style title containner */ .title{ width: 100%; text-align: center; font-size: 17px; padding: 8px 0; } +/* sub-container of the title container */ .subTitle{ display: flex; justify-content: space-between; padding-bottom: 3px; padding: 0 2px; } +/* the main conntainer of the card */ .trending{ display: flex; flex-wrap: wrap; diff --git a/src/AppView/Components/MovieCard.js b/src/AppView/Components/MovieCard.js new file mode 100644 index 0000000..0b1cd77 --- /dev/null +++ b/src/AppView/Components/MovieCard.js @@ -0,0 +1,49 @@ +// imported packages +import React from 'react'; +import PropTypes from 'prop-types'; + +// imported High Order Component +import HocComponent from '../../HOC/HocComponent'; + +// imported css file +import './CssFiles/showMovie.css'; + +/** + * use to render every movie + * @param {object} Data Which need to dispay on the Dashboard + * @returns A node + */ +const MovieCard = (props) => { + const { data } = props; + return ( +
+ {/* render evry movie using map method */} + {data + && data.map((item) => ( +
+ {/* Displaying the Movie Data */} + {item.title} + {item.title} + + {item.director} + {item.year} + +
+ ))} +
// trending End + ); +}; +// validating props +MovieCard.propTypes = { + data: PropTypes.arrayOf.isRequired, +}; +/** + * Created Component using High Order Component + */ +const Card = HocComponent(MovieCard); +export default Card; diff --git a/src/AppView/Components/Slidder.js b/src/AppView/Components/Slidder.js new file mode 100644 index 0000000..a076117 --- /dev/null +++ b/src/AppView/Components/Slidder.js @@ -0,0 +1,51 @@ +// imported Packages +import React from 'react'; +import PropTypes from 'prop-types'; + +// imported Packeage of the Slidder +import { Carousel } from 'react-responsive-carousel'; + +// imported High Order Component +import HocComponent from '../../HOC/HocComponent'; + +// imported css File +import 'react-responsive-carousel/lib/styles/carousel.min.css'; +import './CssFiles/Slidder.css'; + +/** + * Add two numbers. + * @param {object} props The Data ehich needs to display. + * @returns {number} The sum of the two numbers. + */ +const Slidder = (props) => { + const { data } = props; + return ( + + { + // display the data using map method + data + && data.map((item) => ( +
+ {/* displaying the data in Slidder */} + {item.title} +

{item.title}

+
// mainDivOfSlidder end + )) + } +
+ ); +}; +// validating props +Slidder.propTypes = { + data: PropTypes.arrayOf.isRequired, +}; + +/** + * use to create component using Hoc + */ +const HocSlidder = HocComponent(Slidder); +export default HocSlidder; diff --git a/src/AppView/Dashboard/Main.js b/src/AppView/Dashboard/Main.js index a50cff9..2be7340 100644 --- a/src/AppView/Dashboard/Main.js +++ b/src/AppView/Dashboard/Main.js @@ -1,45 +1,47 @@ +// imported Packages import React, { useContext } from 'react'; import { useNavigate } from 'react-router-dom'; -// imported Packages -import { userContext } from '../../Context/UserContext'; -// imported Created Context +// imported Context constant +import userContext from '../../Context/UserContext'; -import HeaderNav from '../Navbar/HeaderNav'; -import HocSlidder from '../Slidder'; -import Card from '../MovieCard'; -import { secureRoute } from '../../Routing/RouteVars'; // imported Reqiured Components +import HeaderNav from '../Navbar/HeaderNav'; +import HocSlidder from '../Components/Slidder'; +import Card from '../Components/MovieCard'; + +// imported Route Constant +import { secureRoute } from '../../Routing/RouteConstants'; /** * Main is Rendring Multiple Components in Dashboard * */ const Main = () => { - // a variable to navigate to the Pages - const navigate = useNavigate(); + // a constant to navigate to the Pages + const navigate = useNavigate(); - // Get the Context Value using destructring - const contextData = useContext(userContext); - const { loginData } = contextData; - /** + // Get the Context Value using destructring + const contextData = useContext(userContext); + const { loginData } = contextData; + /** * use to provide Authrization */ - if (loginData.loggedIn === false) { - navigate(secureRoute); - } - return ( -
- {/* Navbar Component */} - - - {/* Slidder Component */} - - - {/* MovieCard Component */} - -
- ); + if (loginData.loggedIn === false) { + navigate(secureRoute); + } + return ( + <> + {/* Navbar Component */} + + + {/* Slidder Component */} + + + {/* MovieCard Component */} + + + ); }; export default Main; diff --git a/src/AppView/Login/Login.css b/src/AppView/Login/Login.css index 9380022..c032114 100644 --- a/src/AppView/Login/Login.css +++ b/src/AppView/Login/Login.css @@ -1,6 +1,8 @@ +/* A body of the login Component */ body{ background-color: #36454F; } +/* use to style the login conntainer */ .login{ width: 15%; margin-top: 18%; diff --git a/src/AppView/Login/Login.js b/src/AppView/Login/Login.js index c181ef1..d291b45 100644 --- a/src/AppView/Login/Login.js +++ b/src/AppView/Login/Login.js @@ -1,103 +1,107 @@ -import React, { useState } from 'react'; -import { useContext } from 'react'; -import { useNavigate } from 'react-router-dom'; // imported Packages +import React, { useState, useContext } from 'react'; +import { useNavigate } from 'react-router-dom'; +import swal from 'sweetalert'; -import { userContext } from '../../Context/UserContext'; -// imported Created Context +// imported Conntext Connstants +import userContext from '../../Context/UserContext'; -import { dashboardRoute } from '../../Routing/RouteVars'; -// imported Route Variables +// imported Route Constant +import { dashboardRoute } from '../../Routing/RouteConstants'; -import { loginFailMsg } from '../../Masseges'; +// imported Masseges +import loginFailMsg from '../../Masseges'; + +// immported User details import { adminUser, adminPass } from '../../AdminDetail'; -// imported Masseges and UserDetails -import './Login.css'; // imporing css file +import './Login.css'; /** * Use for Login In the App * */ + const Login = () => { - // a Variable for Navigate to the different Page - const navigate = useNavigate(); + // a Constant for Navigate to the different Page + const navigate = useNavigate(); - // states of this Component - const [loginUser, setLoginUser] = useState(''); - const [loginPassword, setLoginPassword] = useState(''); + // states + const [loginUser, setLoginUser] = useState(''); + const [loginPassword, setLoginPassword] = useState(''); - // Get the Context Value using Destructure - const contextData = useContext(userContext); - const { loginData, setLoginData } = contextData; + // Get the Context Value using Destructure + const contextData = useContext(userContext); + const { loginData, setLoginData } = contextData; - /** + /** * On submit the data in Context to go Dashboard of the App - * @param {object} event is use for prevent refresh + * @param {object} event is use for prevent refresh of the page */ - const handelSubmit = (event) => { - // prevent page refreshing on submit - event.preventDefault(); - - // matching the input values - if (loginUser === adminUser && loginPassword === adminPass) { - setLoginData({ - ...loginData, - username: loginUser, - password: loginPassword, - loggedIn: true, - }); - - // navigating to dashboard - navigate(dashboardRoute); - return; - } - // if Entered Values are wrong fire alert mesaage with wrong credential - alert(loginFailMsg); - }; - - return ( -
- {/* Form for Login */} -
-
-

Login Form

- - {/* User Name field */} - { - setLoginUser(e.target.value); - }} - /> -
- - {/* Password field */} -
- { - setLoginPassword(e.target.value); - }} - /> -
- - {/* Submit */} - -
+ const handelSubmit = (event) => { + // prevent page refreshing on submit + event.preventDefault(); + + // matching the input values + if (loginUser === adminUser && loginPassword === adminPass) { + setLoginData({ + ...loginData, + username: loginUser, + password: loginPassword, + loggedIn: true, + }); + + // navigating to dashboard + navigate(dashboardRoute); + return; + } + // if Entered Values are wrong fire alert mesaage with wrong credential + swal(loginFailMsg); + }; + + return ( +
+ + {/* Form for Login */} +
+
+

Login Form

+ + {/* User Name field */} + { + setLoginUser(e.target.value); + }} + />
- ); + + {/* Password field */} +
+ { + setLoginPassword(e.target.value); + }} + /> +
+ + {/* Submit */} + +
+
+ ); }; export default Login; diff --git a/src/AppView/MovieCard.js b/src/AppView/MovieCard.js deleted file mode 100644 index 084a201..0000000 --- a/src/AppView/MovieCard.js +++ /dev/null @@ -1,53 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -// imported packages - -import HocComponent from '../HOC/HocComponent'; -//imported High Order Component - -import './CssFiles/showMovie.css'; -//imported css file - -/** - * use to render every movie - * @param {props} param0 the Data Which have to dispay on the Dashboard - * @returns - */ -const MovieCard = ({ data }) => { - //destructure props - return ( -
- {data && - data.map((item) => { - // render evry movie using map method - return ( -
- {/* Displaying the Movie Data */} - {item.title} - {item.title} - - {item.director} - {item.year} - -
- ); - })} -
// trending End - ); -}; -// validating props -MovieCard.propTypes = { - data: PropTypes.array.isRequired, -}; -/** - * Created Component using High Order Component - */ - -const Card = HocComponent(MovieCard); - -export default Card; diff --git a/src/AppView/Navbar/HeaderNav.js b/src/AppView/Navbar/HeaderNav.js index f30b464..73af50a 100644 --- a/src/AppView/Navbar/HeaderNav.js +++ b/src/AppView/Navbar/HeaderNav.js @@ -1,91 +1,94 @@ +// imported Requried Packages import { React, useContext } from 'react'; import { useNavigate } from 'react-router-dom'; -// imported Requried Packages // To Get the Created Context variable -import { userContext } from '../../Context/UserContext'; +import userContext from '../../Context/UserContext'; // imported Custom Hook for nameChange import useForNameChange from '../../CustomHook/useForNameChange'; -// imporing Routes Variable -import { secureRoute } from '../../Routing/RouteVars'; +// imporing Routes Constants +import { secureRoute } from '../../Routing/RouteConstants'; /** * A Navbar with Logout feature and logo of the App * */ + const HeaderNav = () => { - // Providing the Static Values using Custom Hook - const { changeName } = useForNameChange('Prince'); + // Providing the Static Values using Custom Hook and destructure a funnction + const { changeName } = useForNameChange('Prince'); - // A Variable to Navigate to the page - const navigate = useNavigate(); + // A Variable to Navigate to the page + const navigate = useNavigate(); - // Get the Context value using Destring - const useForLogout = useContext(userContext); - const { loginData, setLoginData } = useForLogout; - const { username } = loginData; + // Get the Context value using Destructring + const useForLogout = useContext(userContext); + const { loginData, setLoginData } = useForLogout; + const { username } = loginData; - /** - * A logout feature of the App + /** + * A logout function to handel logout button * */ - const handelLogout = () => { - // Clearing the userDeatis to null - setLoginData({ - ...loginData, - username: '', - password: '', - loggedIn: false, - }); - navigate(secureRoute); - }; + const handelLogout = () => { + // Clearing the userDeatis to empty string + setLoginData({ + ...loginData, + username: '', + password: '', + loggedIn: false, + }); + // navigating to authrization page + navigate(secureRoute); + }; - /** + /** * use to change the name on a click using custom hook */ - const changeNameWithCustomHook = (event) => { - //prevent refreshing page - event.preventDefault(); + const changeNameWithCustomHook = (event) => { + // prevent refreshing page + event.preventDefault(); - // Use A Method to Change Name - changeName(); - }; - return ( - <> -
+ + ); }; export default HeaderNav; diff --git a/src/AppView/Slidder.js b/src/AppView/Slidder.js deleted file mode 100644 index 30177aa..0000000 --- a/src/AppView/Slidder.js +++ /dev/null @@ -1,53 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -// imported Packages - -import { Carousel } from 'react-responsive-carousel'; -// imported Packeage of the Slidder - -import HocComponent from '../HOC/HocComponent'; -// imported High Order Component - -import 'react-responsive-carousel/lib/styles/carousel.min.css'; -import './CssFiles/Slidder.css'; -// imported css File - -/** - * - * @param {props} param0 the Data Which have to dispay on the Dashboard - * @returns - */ -function Slidder({ data }) { - // destructure the props - return ( - - { - // eslint-disable-next-line react/prop-types - data && - data.map((item) => { - return ( -
- {/* displaying the data in Slidder */} - -

{item.title}

-
// mainDivOfSlidder end - ); - }) - } -
- ); -} -// validating props -Slidder.propTypes = { - data: PropTypes.array.isRequired, -}; - -/** - * use to create component using Hoc - */ -const HocSlidder = HocComponent(Slidder); - -export default HocSlidder; diff --git a/src/Authrization/index.js b/src/Authrization/index.js index 00d1034..e70c0fb 100644 --- a/src/Authrization/index.js +++ b/src/Authrization/index.js @@ -1,33 +1,33 @@ +// imported Packages import { useContext, useEffect } from 'react'; import { useNavigate } from 'react-router-dom'; -// imported Packages -import { loginRoute, dashboardRoute } from '../Routing/RouteVars'; +// imported Required Routes Constants +import { loginRoute, dashboardRoute } from '../Routing/RouteConstants'; -import { userContext } from '../Context/UserContext'; -// imported Created Context Variable +// imported Context Constant +import userContext from '../Context/UserContext'; /** * * Auth is use to Provide Authantication in app */ const Auth = () => { - // a variable to navigate to the Pages - const navigate = useNavigate(); + // a constant to navigate to the Pages + const navigate = useNavigate(); - // Get the Context Value using destructring - const contextData = useContext(userContext); - const { loginData } = contextData; + // Get the Context Value using destructring + const contextData = useContext(userContext); + const { loginData } = contextData; - useEffect(() => { - if (loginData.loggedIn === true) { - // navigate to dashboard page - navigate(dashboardRoute); - return; - } - // Navigating to login page - navigate(loginRoute); - }, [loginData.loggedIn]); - // Checking the logged in user + useEffect(() => { + if (loginData.loggedIn === true) { + // navigate to dashboard page + navigate(dashboardRoute); + return; + } + // navigate to login page + navigate(loginRoute); + }, [loginData.loggedIn]); }; export default Auth; diff --git a/src/Context/UserContext.js b/src/Context/UserContext.js index adf448c..f04d8b2 100644 --- a/src/Context/UserContext.js +++ b/src/Context/UserContext.js @@ -1,7 +1,10 @@ +// imported Package import { createContext } from 'react'; -//imported Package /** - * creating the context variable + * creating the context constant */ -export const userContext = createContext(); + +const userContext = createContext(); + +export default userContext; diff --git a/src/CustomHook/useForNameChange.js b/src/CustomHook/useForNameChange.js index 71fe077..dc4ea35 100644 --- a/src/CustomHook/useForNameChange.js +++ b/src/CustomHook/useForNameChange.js @@ -1,30 +1,30 @@ -import { useContext } from 'react'; // imported Package +import { useContext } from 'react'; -import { userContext } from '../Context/UserContext'; -// Immported created Context Variable +// Imported Context constant +import userContext from '../Context/UserContext'; /** - * use to update the username in Context using custom hook - * @param {string} nameForChange - * @returns + * use to update the username in Context using custom hook + * @param {string} use to provide name + * @returns */ + const useForNameChange = (nameForChange) => { - // Get the Context Value using deestructuring - const useForNameChange = useContext(userContext); - const { loginData, setLoginData } = useForNameChange; + // Get the Context Value using destructuring + const contextData = useContext(userContext); + const { loginData, setLoginData } = contextData; - /** - * - * @returns A function to change Name - */ - const changeName = () => - setLoginData({ - ...loginData, - username: nameForChange, - }); + /** + * @returns A function to change Name + */ - return { changeName }; + const changeName = () => setLoginData({ + ...loginData, + username: nameForChange, + }); + // return a function + return { changeName }; }; export default useForNameChange; diff --git a/src/FakeApi/PopularMovie.js b/src/FakeApi/PopularMovie.js index 2c32a19..bac8f5c 100644 --- a/src/FakeApi/PopularMovie.js +++ b/src/FakeApi/PopularMovie.js @@ -1,1204 +1,1205 @@ +// A constant of popular movies const popularMovies = { - movies: [ - { - id: 1, - title: 'Beetlejuice', - year: '1988', - runtime: '92', - genres: ['Comedy', 'Fantasy'], - director: 'Tim Burton', - actors: 'Alec Baldwin, Geena Davis, Annie McEnroe, Maurice Page', - plot: 'A couple of recently deceased ghosts contract the services of a "bio-exorcist" in order to remove the obnoxious new owners of their house.', - posterUrl: + movies: [ + { + id: 1, + title: 'Beetlejuice', + year: '1988', + runtime: '92', + genres: ['Comedy', 'Fantasy'], + director: 'Tim Burton', + actors: 'Alec Baldwin, Geena Davis, Annie McEnroe, Maurice Page', + plot: 'A couple of recently deceased ghosts contract the services of a "bio-exorcist" in order to remove the obnoxious new owners of their house.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTUwODE3MDE0MV5BMl5BanBnXkFtZTgwNTk1MjI4MzE@._V1_SX300.jpg', - }, - { - id: 2, - title: 'The Cotton Club', - year: '1984', - runtime: '127', - genres: ['Crime', 'Drama', 'Music'], - director: 'Francis Ford Coppola', - actors: 'Richard Gere, Gregory Hines, Diane Lane, Lonette McKee', - plot: 'The Cotton Club was a famous night club in Harlem. The story follows the people that visited the club, those that ran it, and is peppered with the Jazz music that made it so famous.', - posterUrl: + }, + { + id: 2, + title: 'The Cotton Club', + year: '1984', + runtime: '127', + genres: ['Crime', 'Drama', 'Music'], + director: 'Francis Ford Coppola', + actors: 'Richard Gere, Gregory Hines, Diane Lane, Lonette McKee', + plot: 'The Cotton Club was a famous night club in Harlem. The story follows the people that visited the club, those that ran it, and is peppered with the Jazz music that made it so famous.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTU5ODAyNzA4OV5BMl5BanBnXkFtZTcwNzYwNTIzNA@@._V1_SX300.jpg', - }, - { - id: 3, - title: 'The Shawshank Redemption', - year: '1994', - runtime: '142', - genres: ['Crime', 'Drama'], - director: 'Frank Darabont', - actors: 'Tim Robbins, Morgan Freeman, Bob Gunton, William Sadler', - plot: 'Two imprisoned men bond over a number of years, finding solace and eventual redemption through acts of common decency.', - posterUrl: + }, + { + id: 3, + title: 'The Shawshank Redemption', + year: '1994', + runtime: '142', + genres: ['Crime', 'Drama'], + director: 'Frank Darabont', + actors: 'Tim Robbins, Morgan Freeman, Bob Gunton, William Sadler', + plot: 'Two imprisoned men bond over a number of years, finding solace and eventual redemption through acts of common decency.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BODU4MjU4NjIwNl5BMl5BanBnXkFtZTgwMDU2MjEyMDE@._V1_SX300.jpg', - }, - { - id: 4, - title: 'Crocodile Dundee', - year: '1986', - runtime: '97', - genres: ['Adventure', 'Comedy'], - director: 'Peter Faiman', - actors: 'Paul Hogan, Linda Kozlowski, John Meillon, David Gulpilil', - plot: 'An American reporter goes to the Australian outback to meet an eccentric crocodile poacher and invites him to New York City.', - posterUrl: + }, + { + id: 4, + title: 'Crocodile Dundee', + year: '1986', + runtime: '97', + genres: ['Adventure', 'Comedy'], + director: 'Peter Faiman', + actors: 'Paul Hogan, Linda Kozlowski, John Meillon, David Gulpilil', + plot: 'An American reporter goes to the Australian outback to meet an eccentric crocodile poacher and invites him to New York City.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTg0MTU1MTg4NF5BMl5BanBnXkFtZTgwMDgzNzYxMTE@._V1_SX300.jpg', - }, - { - id: 5, - title: 'Valkyrie', - year: '2008', - runtime: '121', - genres: ['Drama', 'History', 'Thriller'], - director: 'Bryan Singer', - actors: 'Tom Cruise, Kenneth Branagh, Bill Nighy, Tom Wilkinson', - plot: 'A dramatization of the 20 July assassination and political coup plot by desperate renegade German Army officers against Hitler during World War II.', - posterUrl: + }, + { + id: 5, + title: 'Valkyrie', + year: '2008', + runtime: '121', + genres: ['Drama', 'History', 'Thriller'], + director: 'Bryan Singer', + actors: 'Tom Cruise, Kenneth Branagh, Bill Nighy, Tom Wilkinson', + plot: 'A dramatization of the 20 July assassination and political coup plot by desperate renegade German Army officers against Hitler during World War II.', + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMTg3Njc2ODEyN15BMl5BanBnXkFtZTcwNTAwMzc3NA@@._V1_SX300.jpg', - }, - { - id: 6, - title: 'Ratatouille', - year: '2007', - runtime: '111', - genres: ['Animation', 'Comedy', 'Family'], - director: 'Brad Bird, Jan Pinkava', - actors: 'Patton Oswalt, Ian Holm, Lou Romano, Brian Dennehy', - plot: 'A rat who can cook makes an unusual alliance with a young kitchen worker at a famous restaurant.', - posterUrl: + }, + { + id: 6, + title: 'Ratatouille', + year: '2007', + runtime: '111', + genres: ['Animation', 'Comedy', 'Family'], + director: 'Brad Bird, Jan Pinkava', + actors: 'Patton Oswalt, Ian Holm, Lou Romano, Brian Dennehy', + plot: 'A rat who can cook makes an unusual alliance with a young kitchen worker at a famous restaurant.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTMzODU0NTkxMF5BMl5BanBnXkFtZTcwMjQ4MzMzMw@@._V1_SX300.jpg', - }, - { - id: 7, - title: 'City of God', - year: '2002', - runtime: '130', - genres: ['Crime', 'Drama'], - director: 'Fernando Meirelles, Kátia Lund', - actors: 'Alexandre Rodrigues, Leandro Firmino, Phellipe Haagensen, Douglas Silva', - plot: 'Two boys growing up in a violent neighborhood of Rio de Janeiro take different paths: one becomes a photographer, the other a drug dealer.', - posterUrl: + }, + { + id: 7, + title: 'City of God', + year: '2002', + runtime: '130', + genres: ['Crime', 'Drama'], + director: 'Fernando Meirelles, Kátia Lund', + actors: 'Alexandre Rodrigues, Leandro Firmino, Phellipe Haagensen, Douglas Silva', + plot: 'Two boys growing up in a violent neighborhood of Rio de Janeiro take different paths: one becomes a photographer, the other a drug dealer.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjA4ODQ3ODkzNV5BMl5BanBnXkFtZTYwOTc4NDI3._V1_SX300.jpg', - }, - { - id: 8, - title: 'Memento', - year: '2000', - runtime: '113', - genres: ['Mystery', 'Thriller'], - director: 'Christopher Nolan', - actors: 'Guy Pearce, Carrie-Anne Moss, Joe Pantoliano, Mark Boone Junior', - plot: "A man juggles searching for his wife's murderer and keeping his short-term memory loss from being an obstacle.", - posterUrl: + }, + { + id: 8, + title: 'Memento', + year: '2000', + runtime: '113', + genres: ['Mystery', 'Thriller'], + director: 'Christopher Nolan', + actors: 'Guy Pearce, Carrie-Anne Moss, Joe Pantoliano, Mark Boone Junior', + plot: "A man juggles searching for his wife's murderer and keeping his short-term memory loss from being an obstacle.", + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BNThiYjM3MzktMDg3Yy00ZWQ3LTk3YWEtN2M0YmNmNWEwYTE3XkEyXkFqcGdeQXVyMTQxNzMzNDI@._V1_SX300.jpg', - }, - { - id: 9, - title: 'The Intouchables', - year: '2011', - runtime: '112', - genres: ['Biography', 'Comedy', 'Drama'], - director: 'Olivier Nakache, Eric Toledano', - actors: 'François Cluzet, Omar Sy, Anne Le Ny, Audrey Fleurot', - plot: 'After he becomes a quadriplegic from a paragliding accident, an aristocrat hires a young man from the projects to be his caregiver.', - posterUrl: + }, + { + id: 9, + title: 'The Intouchables', + year: '2011', + runtime: '112', + genres: ['Biography', 'Comedy', 'Drama'], + director: 'Olivier Nakache, Eric Toledano', + actors: 'François Cluzet, Omar Sy, Anne Le Ny, Audrey Fleurot', + plot: 'After he becomes a quadriplegic from a paragliding accident, an aristocrat hires a young man from the projects to be his caregiver.', + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMTYxNDA3MDQwNl5BMl5BanBnXkFtZTcwNTU4Mzc1Nw@@._V1_SX300.jpg', - }, - { - id: 10, - title: 'Stardust', - year: '2007', - runtime: '127', - genres: ['Adventure', 'Family', 'Fantasy'], - director: 'Matthew Vaughn', - actors: 'Ian McKellen, Bimbo Hart, Alastair MacIntosh, David Kelly', - plot: "In a countryside town bordering on a magical land, a young man makes a promise to his beloved that he'll retrieve a fallen star by venturing into the magical realm.", - posterUrl: + }, + { + id: 10, + title: 'Stardust', + year: '2007', + runtime: '127', + genres: ['Adventure', 'Family', 'Fantasy'], + director: 'Matthew Vaughn', + actors: 'Ian McKellen, Bimbo Hart, Alastair MacIntosh, David Kelly', + plot: "In a countryside town bordering on a magical land, a young man makes a promise to his beloved that he'll retrieve a fallen star by venturing into the magical realm.", + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjkyMTE1OTYwNF5BMl5BanBnXkFtZTcwMDIxODYzMw@@._V1_SX300.jpg', - }, - { - id: 11, - title: 'Apocalypto', - year: '2006', - runtime: '139', - genres: ['Action', 'Adventure', 'Drama'], - director: 'Mel Gibson', - actors: 'Rudy Youngblood, Dalia Hernández, Jonathan Brewer, Morris Birdyellowhead', - plot: 'As the Mayan kingdom faces its decline, the rulers insist the key to prosperity is to build more temples and offer human sacrifices. Jaguar Paw, a young man captured for sacrifice, flees to avoid his fate.', - posterUrl: + }, + { + id: 11, + title: 'Apocalypto', + year: '2006', + runtime: '139', + genres: ['Action', 'Adventure', 'Drama'], + director: 'Mel Gibson', + actors: 'Rudy Youngblood, Dalia Hernández, Jonathan Brewer, Morris Birdyellowhead', + plot: 'As the Mayan kingdom faces its decline, the rulers insist the key to prosperity is to build more temples and offer human sacrifices. Jaguar Paw, a young man captured for sacrifice, flees to avoid his fate.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BNTM1NjYyNTY5OV5BMl5BanBnXkFtZTcwMjgwNTMzMQ@@._V1_SX300.jpg', - }, - { - id: 12, - title: 'Taxi Driver', - year: '1976', - runtime: '113', - genres: ['Crime', 'Drama'], - director: 'Martin Scorsese', - actors: 'Diahnne Abbott, Frank Adu, Victor Argo, Gino Ardito', - plot: 'A mentally unstable Vietnam War veteran works as a night-time taxi driver in New York City where the perceived decadence and sleaze feeds his urge for violent action, attempting to save a preadolescent prostitute in the process.', - posterUrl: + }, + { + id: 12, + title: 'Taxi Driver', + year: '1976', + runtime: '113', + genres: ['Crime', 'Drama'], + director: 'Martin Scorsese', + actors: 'Diahnne Abbott, Frank Adu, Victor Argo, Gino Ardito', + plot: 'A mentally unstable Vietnam War veteran works as a night-time taxi driver in New York City where the perceived decadence and sleaze feeds his urge for violent action, attempting to save a preadolescent prostitute in the process.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BNGQxNDgzZWQtZTNjNi00M2RkLWExZmEtNmE1NjEyZDEwMzA5XkEyXkFqcGdeQXVyMTQxNzMzNDI@._V1_SX300.jpg', - }, - { - id: 13, - title: 'No Country for Old Men', - year: '2007', - runtime: '122', - genres: ['Crime', 'Drama', 'Thriller'], - director: 'Ethan Coen, Joel Coen', - actors: 'Tommy Lee Jones, Javier Bardem, Josh Brolin, Woody Harrelson', - plot: 'Violence and mayhem ensue after a hunter stumbles upon a drug deal gone wrong and more than two million dollars in cash near the Rio Grande.', - posterUrl: + }, + { + id: 13, + title: 'No Country for Old Men', + year: '2007', + runtime: '122', + genres: ['Crime', 'Drama', 'Thriller'], + director: 'Ethan Coen, Joel Coen', + actors: 'Tommy Lee Jones, Javier Bardem, Josh Brolin, Woody Harrelson', + plot: 'Violence and mayhem ensue after a hunter stumbles upon a drug deal gone wrong and more than two million dollars in cash near the Rio Grande.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjA5Njk3MjM4OV5BMl5BanBnXkFtZTcwMTc5MTE1MQ@@._V1_SX300.jpg', - }, - { - id: 14, - title: 'Planet 51', - year: '2009', - runtime: '91', - genres: ['Animation', 'Adventure', 'Comedy'], - director: 'Jorge Blanco, Javier Abad, Marcos Martínez', - actors: 'Jessica Biel, John Cleese, Gary Oldman, Dwayne Johnson', - plot: 'An alien civilization is invaded by Astronaut Chuck Baker, who believes that the planet was uninhabited. Wanted by the military, Baker must get back to his ship before it goes into orbit without him.', - posterUrl: + }, + { + id: 14, + title: 'Planet 51', + year: '2009', + runtime: '91', + genres: ['Animation', 'Adventure', 'Comedy'], + director: 'Jorge Blanco, Javier Abad, Marcos Martínez', + actors: 'Jessica Biel, John Cleese, Gary Oldman, Dwayne Johnson', + plot: 'An alien civilization is invaded by Astronaut Chuck Baker, who believes that the planet was uninhabited. Wanted by the military, Baker must get back to his ship before it goes into orbit without him.', + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMTUyOTAyNTA5Ml5BMl5BanBnXkFtZTcwODU2OTM0Mg@@._V1_SX300.jpg', - }, - { - id: 15, - title: 'Looper', - year: '2012', - runtime: '119', - genres: ['Action', 'Crime', 'Drama'], - director: 'Rian Johnson', - actors: 'Joseph Gordon-Levitt, Bruce Willis, Emily Blunt, Paul Dano', - plot: "In 2074, when the mob wants to get rid of someone, the target is sent into the past, where a hired gun awaits - someone like Joe - who one day learns the mob wants to 'close the loop' by sending back Joe's future self for assassination.", - posterUrl: + }, + { + id: 15, + title: 'Looper', + year: '2012', + runtime: '119', + genres: ['Action', 'Crime', 'Drama'], + director: 'Rian Johnson', + actors: 'Joseph Gordon-Levitt, Bruce Willis, Emily Blunt, Paul Dano', + plot: "In 2074, when the mob wants to get rid of someone, the target is sent into the past, where a hired gun awaits - someone like Joe - who one day learns the mob wants to 'close the loop' by sending back Joe's future self for assassination.", + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMTY3NTY0MjEwNV5BMl5BanBnXkFtZTcwNTE3NDA1OA@@._V1_SX300.jpg', - }, - { - id: 16, - title: 'Corpse Bride', - year: '2005', - runtime: '77', - genres: ['Animation', 'Drama', 'Family'], - director: 'Tim Burton, Mike Johnson', - actors: 'Johnny Depp, Helena Bonham Carter, Emily Watson, Tracey Ullman', - plot: 'When a shy groom practices his wedding vows in the inadvertent presence of a deceased young woman, she rises from the grave assuming he has married her.', - posterUrl: + }, + { + id: 16, + title: 'Corpse Bride', + year: '2005', + runtime: '77', + genres: ['Animation', 'Drama', 'Family'], + director: 'Tim Burton, Mike Johnson', + actors: 'Johnny Depp, Helena Bonham Carter, Emily Watson, Tracey Ullman', + plot: 'When a shy groom practices his wedding vows in the inadvertent presence of a deceased young woman, she rises from the grave assuming he has married her.', + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMTk1MTY1NjU4MF5BMl5BanBnXkFtZTcwNjIzMTEzMw@@._V1_SX300.jpg', - }, - { - id: 17, - title: 'The Third Man', - year: '1949', - runtime: '93', - genres: ['Film-Noir', 'Mystery', 'Thriller'], - director: 'Carol Reed', - actors: 'Joseph Cotten, Alida Valli, Orson Welles, Trevor Howard', - plot: 'Pulp novelist Holly Martins travels to shadowy, postwar Vienna, only to find himself investigating the mysterious death of an old friend, Harry Lime.', - posterUrl: + }, + { + id: 17, + title: 'The Third Man', + year: '1949', + runtime: '93', + genres: ['Film-Noir', 'Mystery', 'Thriller'], + director: 'Carol Reed', + actors: 'Joseph Cotten, Alida Valli, Orson Welles, Trevor Howard', + plot: 'Pulp novelist Holly Martins travels to shadowy, postwar Vienna, only to find himself investigating the mysterious death of an old friend, Harry Lime.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjMwNzMzMTQ0Ml5BMl5BanBnXkFtZTgwNjExMzUwNjE@._V1_SX300.jpg', - }, - { - id: 18, - title: 'The Beach', - year: '2000', - runtime: '119', - genres: ['Adventure', 'Drama', 'Romance'], - director: 'Danny Boyle', - actors: 'Leonardo DiCaprio, Daniel York, Patcharawan Patarakijjanon, Virginie Ledoyen', - plot: 'Twenty-something Richard travels to Thailand and finds himself in possession of a strange map. Rumours state that it leads to a solitary beach paradise, a tropical bliss - excited and intrigued, he sets out to find it.', - posterUrl: + }, + { + id: 18, + title: 'The Beach', + year: '2000', + runtime: '119', + genres: ['Adventure', 'Drama', 'Romance'], + director: 'Danny Boyle', + actors: 'Leonardo DiCaprio, Daniel York, Patcharawan Patarakijjanon, Virginie Ledoyen', + plot: 'Twenty-something Richard travels to Thailand and finds himself in possession of a strange map. Rumours state that it leads to a solitary beach paradise, a tropical bliss - excited and intrigued, he sets out to find it.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BN2ViYTFiZmUtOTIxZi00YzIxLWEyMzUtYjQwZGNjMjNhY2IwXkEyXkFqcGdeQXVyNDk3NzU2MTQ@._V1_SX300.jpg', - }, - { - id: 19, - title: 'Scarface', - year: '1983', - runtime: '170', - genres: ['Crime', 'Drama'], - director: 'Brian De Palma', - actors: 'Al Pacino, Steven Bauer, Michelle Pfeiffer, Mary Elizabeth Mastrantonio', - plot: 'In Miami in 1980, a determined Cuban immigrant takes over a drug cartel and succumbs to greed.', - posterUrl: + }, + { + id: 19, + title: 'Scarface', + year: '1983', + runtime: '170', + genres: ['Crime', 'Drama'], + director: 'Brian De Palma', + actors: 'Al Pacino, Steven Bauer, Michelle Pfeiffer, Mary Elizabeth Mastrantonio', + plot: 'In Miami in 1980, a determined Cuban immigrant takes over a drug cartel and succumbs to greed.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjAzOTM4MzEwNl5BMl5BanBnXkFtZTgwMzU1OTc1MDE@._V1_SX300.jpg', - }, - { - id: 20, - title: 'Sid and Nancy', - year: '1986', - runtime: '112', - genres: ['Biography', 'Drama', 'Music'], - director: 'Alex Cox', - actors: 'Gary Oldman, Chloe Webb, David Hayman, Debby Bishop', - plot: 'Morbid biographical story of Sid Vicious, bassist with British punk group the Sex Pistols, and his girlfriend Nancy Spungen. When the Sex Pistols break up after their fateful US tour, ...', - posterUrl: + }, + { + id: 20, + title: 'Sid and Nancy', + year: '1986', + runtime: '112', + genres: ['Biography', 'Drama', 'Music'], + director: 'Alex Cox', + actors: 'Gary Oldman, Chloe Webb, David Hayman, Debby Bishop', + plot: 'Morbid biographical story of Sid Vicious, bassist with British punk group the Sex Pistols, and his girlfriend Nancy Spungen. When the Sex Pistols break up after their fateful US tour, ...', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjExNjA5NzY4M15BMl5BanBnXkFtZTcwNjQ2NzI5NA@@._V1_SX300.jpg', - }, - { - id: 21, - title: 'Black Swan', - year: '2010', - runtime: '108', - genres: ['Drama', 'Thriller'], - director: 'Darren Aronofsky', - actors: 'Natalie Portman, Mila Kunis, Vincent Cassel, Barbara Hershey', - plot: 'A committed dancer wins the lead role in a production of Tchaikovsky\'s "Swan Lake" only to find herself struggling to maintain her sanity.', - posterUrl: + }, + { + id: 21, + title: 'Black Swan', + year: '2010', + runtime: '108', + genres: ['Drama', 'Thriller'], + director: 'Darren Aronofsky', + actors: 'Natalie Portman, Mila Kunis, Vincent Cassel, Barbara Hershey', + plot: 'A committed dancer wins the lead role in a production of Tchaikovsky\'s "Swan Lake" only to find herself struggling to maintain her sanity.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BNzY2NzI4OTE5MF5BMl5BanBnXkFtZTcwMjMyNDY4Mw@@._V1_SX300.jpg', - }, - { - id: 22, - title: 'Inception', - year: '2010', - runtime: '148', - genres: ['Action', 'Adventure', 'Sci-Fi'], - director: 'Christopher Nolan', - actors: 'Leonardo DiCaprio, Joseph Gordon-Levitt, Ellen Page, Tom Hardy', - plot: 'A thief, who steals corporate secrets through use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a CEO.', - posterUrl: + }, + { + id: 22, + title: 'Inception', + year: '2010', + runtime: '148', + genres: ['Action', 'Adventure', 'Sci-Fi'], + director: 'Christopher Nolan', + actors: 'Leonardo DiCaprio, Joseph Gordon-Levitt, Ellen Page, Tom Hardy', + plot: 'A thief, who steals corporate secrets through use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a CEO.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg', - }, - { - id: 23, - title: 'The Deer Hunter', - year: '1978', - runtime: '183', - genres: ['Drama', 'War'], - director: 'Michael Cimino', - actors: 'Robert De Niro, John Cazale, John Savage, Christopher Walken', - plot: 'An in-depth examination of the ways in which the U.S. Vietnam War impacts and disrupts the lives of people in a small industrial town in Pennsylvania.', - posterUrl: + }, + { + id: 23, + title: 'The Deer Hunter', + year: '1978', + runtime: '183', + genres: ['Drama', 'War'], + director: 'Michael Cimino', + actors: 'Robert De Niro, John Cazale, John Savage, Christopher Walken', + plot: 'An in-depth examination of the ways in which the U.S. Vietnam War impacts and disrupts the lives of people in a small industrial town in Pennsylvania.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTYzYmRmZTQtYjk2NS00MDdlLTkxMDAtMTE2YTM2ZmNlMTBkXkEyXkFqcGdeQXVyNjU0OTQ0OTY@._V1_SX300.jpg', - }, - { - id: 24, - title: 'Chasing Amy', - year: '1997', - runtime: '113', - genres: ['Comedy', 'Drama', 'Romance'], - director: 'Kevin Smith', - actors: 'Ethan Suplee, Ben Affleck, Scott Mosier, Jason Lee', - plot: "Holden and Banky are comic book artists. Everything's going good for them until they meet Alyssa, also a comic book artist. Holden falls for her, but his hopes are crushed when he finds out she's gay.", - posterUrl: + }, + { + id: 24, + title: 'Chasing Amy', + year: '1997', + runtime: '113', + genres: ['Comedy', 'Drama', 'Romance'], + director: 'Kevin Smith', + actors: 'Ethan Suplee, Ben Affleck, Scott Mosier, Jason Lee', + plot: "Holden and Banky are comic book artists. Everything's going good for them until they meet Alyssa, also a comic book artist. Holden falls for her, but his hopes are crushed when he finds out she's gay.", + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BZDM3MTg2MGUtZDM0MC00NzMwLWE5NjItOWFjNjA2M2I4YzgxXkEyXkFqcGdeQXVyMTQxNzMzNDI@._V1_SX300.jpg', - }, - { - id: 25, - title: 'Django Unchained', - year: '2012', - runtime: '165', - genres: ['Drama', 'Western'], - director: 'Quentin Tarantino', - actors: 'Jamie Foxx, Christoph Waltz, Leonardo DiCaprio, Kerry Washington', - plot: 'With the help of a German bounty hunter, a freed slave sets out to rescue his wife from a brutal Mississippi plantation owner.', - posterUrl: + }, + { + id: 25, + title: 'Django Unchained', + year: '2012', + runtime: '165', + genres: ['Drama', 'Western'], + director: 'Quentin Tarantino', + actors: 'Jamie Foxx, Christoph Waltz, Leonardo DiCaprio, Kerry Washington', + plot: 'With the help of a German bounty hunter, a freed slave sets out to rescue his wife from a brutal Mississippi plantation owner.', + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMjIyNTQ5NjQ1OV5BMl5BanBnXkFtZTcwODg1MDU4OA@@._V1_SX300.jpg', - }, - { - id: 26, - title: 'The Silence of the Lambs', - year: '1991', - runtime: '118', - genres: ['Crime', 'Drama', 'Thriller'], - director: 'Jonathan Demme', - actors: 'Jodie Foster, Lawrence A. Bonney, Kasi Lemmons, Lawrence T. Wrentz', - plot: 'A young F.B.I. cadet must confide in an incarcerated and manipulative killer to receive his help on catching another serial killer who skins his victims.', - posterUrl: + }, + { + id: 26, + title: 'The Silence of the Lambs', + year: '1991', + runtime: '118', + genres: ['Crime', 'Drama', 'Thriller'], + director: 'Jonathan Demme', + actors: 'Jodie Foster, Lawrence A. Bonney, Kasi Lemmons, Lawrence T. Wrentz', + plot: 'A young F.B.I. cadet must confide in an incarcerated and manipulative killer to receive his help on catching another serial killer who skins his victims.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTQ2NzkzMDI4OF5BMl5BanBnXkFtZTcwMDA0NzE1NA@@._V1_SX300.jpg', - }, - { - id: 27, - title: 'American Beauty', - year: '1999', - runtime: '122', - genres: ['Drama', 'Romance'], - director: 'Sam Mendes', - actors: 'Kevin Spacey, Annette Bening, Thora Birch, Wes Bentley', - plot: "A sexually frustrated suburban father has a mid-life crisis after becoming infatuated with his daughter's best friend.", - posterUrl: + }, + { + id: 27, + title: 'American Beauty', + year: '1999', + runtime: '122', + genres: ['Drama', 'Romance'], + director: 'Sam Mendes', + actors: 'Kevin Spacey, Annette Bening, Thora Birch, Wes Bentley', + plot: "A sexually frustrated suburban father has a mid-life crisis after becoming infatuated with his daughter's best friend.", + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjM4NTI5NzYyNV5BMl5BanBnXkFtZTgwNTkxNTYxMTE@._V1_SX300.jpg', - }, - { - id: 28, - title: 'Snatch', - year: '2000', - runtime: '102', - genres: ['Comedy', 'Crime'], - director: 'Guy Ritchie', - actors: 'Benicio Del Toro, Dennis Farina, Vinnie Jones, Brad Pitt', - plot: 'Unscrupulous boxing promoters, violent bookmakers, a Russian gangster, incompetent amateur robbers, and supposedly Jewish jewelers fight to track down a priceless stolen diamond.', - posterUrl: + }, + { + id: 28, + title: 'Snatch', + year: '2000', + runtime: '102', + genres: ['Comedy', 'Crime'], + director: 'Guy Ritchie', + actors: 'Benicio Del Toro, Dennis Farina, Vinnie Jones, Brad Pitt', + plot: 'Unscrupulous boxing promoters, violent bookmakers, a Russian gangster, incompetent amateur robbers, and supposedly Jewish jewelers fight to track down a priceless stolen diamond.', + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMTA2NDYxOGYtYjU1Mi00Y2QzLTgxMTQtMWI1MGI0ZGQ5MmU4XkEyXkFqcGdeQXVyNDk3NzU2MTQ@._V1_SX300.jpg', - }, - { - id: 29, - title: 'Midnight Express', - year: '1978', - runtime: '121', - genres: ['Crime', 'Drama', 'Thriller'], - director: 'Alan Parker', - actors: 'Brad Davis, Irene Miracle, Bo Hopkins, Paolo Bonacelli', - plot: 'Billy Hayes, an American college student, is caught smuggling drugs out of Turkey and thrown into prison.', - posterUrl: + }, + { + id: 29, + title: 'Midnight Express', + year: '1978', + runtime: '121', + genres: ['Crime', 'Drama', 'Thriller'], + director: 'Alan Parker', + actors: 'Brad Davis, Irene Miracle, Bo Hopkins, Paolo Bonacelli', + plot: 'Billy Hayes, an American college student, is caught smuggling drugs out of Turkey and thrown into prison.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTQyMDA5MzkyOF5BMl5BanBnXkFtZTgwOTYwNTcxMTE@._V1_SX300.jpg', - }, - { - id: 30, - title: 'Pulp Fiction', - year: '1994', - runtime: '154', - genres: ['Crime', 'Drama'], - director: 'Quentin Tarantino', - actors: 'Tim Roth, Amanda Plummer, Laura Lovelace, John Travolta', - plot: "The lives of two mob hit men, a boxer, a gangster's wife, and a pair of diner bandits intertwine in four tales of violence and redemption.", - posterUrl: + }, + { + id: 30, + title: 'Pulp Fiction', + year: '1994', + runtime: '154', + genres: ['Crime', 'Drama'], + director: 'Quentin Tarantino', + actors: 'Tim Roth, Amanda Plummer, Laura Lovelace, John Travolta', + plot: "The lives of two mob hit men, a boxer, a gangster's wife, and a pair of diner bandits intertwine in four tales of violence and redemption.", + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTkxMTA5OTAzMl5BMl5BanBnXkFtZTgwNjA5MDc3NjE@._V1_SX300.jpg', - }, - { - id: 31, - title: 'Lock, Stock and Two Smoking Barrels', - year: '1998', - runtime: '107', - genres: ['Comedy', 'Crime'], - director: 'Guy Ritchie', - actors: 'Jason Flemyng, Dexter Fletcher, Nick Moran, Jason Statham', - plot: 'A botched card game in London triggers four friends, thugs, weed-growers, hard gangsters, loan sharks and debt collectors to collide with each other in a series of unexpected events, all for the sake of weed, cash and two antique shotguns.', - posterUrl: + }, + { + id: 31, + title: 'Lock, Stock and Two Smoking Barrels', + year: '1998', + runtime: '107', + genres: ['Comedy', 'Crime'], + director: 'Guy Ritchie', + actors: 'Jason Flemyng, Dexter Fletcher, Nick Moran, Jason Statham', + plot: 'A botched card game in London triggers four friends, thugs, weed-growers, hard gangsters, loan sharks and debt collectors to collide with each other in a series of unexpected events, all for the sake of weed, cash and two antique shotguns.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTAyN2JmZmEtNjAyMy00NzYwLThmY2MtYWQ3OGNhNjExMmM4XkEyXkFqcGdeQXVyNDk3NzU2MTQ@._V1_SX300.jpg', - }, - { - id: 32, - title: 'Lucky Number Slevin', - year: '2006', - runtime: '110', - genres: ['Crime', 'Drama', 'Mystery'], - director: 'Paul McGuigan', - actors: 'Josh Hartnett, Bruce Willis, Lucy Liu, Morgan Freeman', - plot: "A case of mistaken identity lands Slevin into the middle of a war being plotted by two of the city's most rival crime bosses: The Rabbi and The Boss. Slevin is under constant surveillance by relentless Detective Brikowski as well as the infamous assassin Goodkat and finds himself having to hatch his own ingenious plot to get them before they get him.", - posterUrl: + }, + { + id: 32, + title: 'Lucky Number Slevin', + year: '2006', + runtime: '110', + genres: ['Crime', 'Drama', 'Mystery'], + director: 'Paul McGuigan', + actors: 'Josh Hartnett, Bruce Willis, Lucy Liu, Morgan Freeman', + plot: "A case of mistaken identity lands Slevin into the middle of a war being plotted by two of the city's most rival crime bosses: The Rabbi and The Boss. Slevin is under constant surveillance by relentless Detective Brikowski as well as the infamous assassin Goodkat and finds himself having to hatch his own ingenious plot to get them before they get him.", + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMzc1OTEwMTk4OF5BMl5BanBnXkFtZTcwMTEzMDQzMQ@@._V1_SX300.jpg', - }, - { - id: 33, - title: 'Rear Window', - year: '1954', - runtime: '112', - genres: ['Mystery', 'Thriller'], - director: 'Alfred Hitchcock', - actors: 'James Stewart, Grace Kelly, Wendell Corey, Thelma Ritter', - plot: 'A wheelchair-bound photographer spies on his neighbours from his apartment window and becomes convinced one of them has committed murder.', - posterUrl: + }, + { + id: 33, + title: 'Rear Window', + year: '1954', + runtime: '112', + genres: ['Mystery', 'Thriller'], + director: 'Alfred Hitchcock', + actors: 'James Stewart, Grace Kelly, Wendell Corey, Thelma Ritter', + plot: 'A wheelchair-bound photographer spies on his neighbours from his apartment window and becomes convinced one of them has committed murder.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BNGUxYWM3M2MtMGM3Mi00ZmRiLWE0NGQtZjE5ODI2OTJhNTU0XkEyXkFqcGdeQXVyMTQxNzMzNDI@._V1_SX300.jpg', - }, - { - id: 34, - title: "Pan's Labyrinth", - year: '2006', - runtime: '118', - genres: ['Drama', 'Fantasy', 'War'], - director: 'Guillermo del Toro', - actors: 'Ivana Baquero, Sergi López, Maribel Verdú, Doug Jones', - plot: 'In the falangist Spain of 1944, the bookish young stepdaughter of a sadistic army officer escapes into an eerie but captivating fantasy world.', - posterUrl: '', - }, - { - id: 35, - title: 'Shutter Island', - year: '2010', - runtime: '138', - genres: ['Mystery', 'Thriller'], - director: 'Martin Scorsese', - actors: 'Leonardo DiCaprio, Mark Ruffalo, Ben Kingsley, Max von Sydow', - plot: 'In 1954, a U.S. marshal investigates the disappearance of a murderess who escaped from a hospital for the criminally insane.', - posterUrl: + }, + { + id: 34, + title: "Pan's Labyrinth", + year: '2006', + runtime: '118', + genres: ['Drama', 'Fantasy', 'War'], + director: 'Guillermo del Toro', + actors: 'Ivana Baquero, Sergi López, Maribel Verdú, Doug Jones', + plot: 'In the falangist Spain of 1944, the bookish young stepdaughter of a sadistic army officer escapes into an eerie but captivating fantasy world.', + posterUrl: '', + }, + { + id: 35, + title: 'Shutter Island', + year: '2010', + runtime: '138', + genres: ['Mystery', 'Thriller'], + director: 'Martin Scorsese', + actors: 'Leonardo DiCaprio, Mark Ruffalo, Ben Kingsley, Max von Sydow', + plot: 'In 1954, a U.S. marshal investigates the disappearance of a murderess who escaped from a hospital for the criminally insane.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTMxMTIyNzMxMV5BMl5BanBnXkFtZTcwOTc4OTI3Mg@@._V1_SX300.jpg', - }, - { - id: 36, - title: 'Reservoir Dogs', - year: '1992', - runtime: '99', - genres: ['Crime', 'Drama', 'Thriller'], - director: 'Quentin Tarantino', - actors: 'Harvey Keitel, Tim Roth, Michael Madsen, Chris Penn', - plot: 'After a simple jewelry heist goes terribly wrong, the surviving criminals begin to suspect that one of them is a police informant.', - posterUrl: + }, + { + id: 36, + title: 'Reservoir Dogs', + year: '1992', + runtime: '99', + genres: ['Crime', 'Drama', 'Thriller'], + director: 'Quentin Tarantino', + actors: 'Harvey Keitel, Tim Roth, Michael Madsen, Chris Penn', + plot: 'After a simple jewelry heist goes terribly wrong, the surviving criminals begin to suspect that one of them is a police informant.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BNjE5ZDJiZTQtOGE2YS00ZTc5LTk0OGUtOTg2NjdjZmVlYzE2XkEyXkFqcGdeQXVyMzM4MjM0Nzg@._V1_SX300.jpg', - }, - { - id: 37, - title: 'The Shining', - year: '1980', - runtime: '146', - genres: ['Drama', 'Horror'], - director: 'Stanley Kubrick', - actors: 'Jack Nicholson, Shelley Duvall, Danny Lloyd, Scatman Crothers', - plot: 'A family heads to an isolated hotel for the winter where an evil and spiritual presence influences the father into violence, while his psychic son sees horrific forebodings from the past and of the future.', - posterUrl: + }, + { + id: 37, + title: 'The Shining', + year: '1980', + runtime: '146', + genres: ['Drama', 'Horror'], + director: 'Stanley Kubrick', + actors: 'Jack Nicholson, Shelley Duvall, Danny Lloyd, Scatman Crothers', + plot: 'A family heads to an isolated hotel for the winter where an evil and spiritual presence influences the father into violence, while his psychic son sees horrific forebodings from the past and of the future.', + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BODMxMjE3NTA4Ml5BMl5BanBnXkFtZTgwNDc0NTIxMDE@._V1_SX300.jpg', - }, - { - id: 38, - title: 'Midnight in Paris', - year: '2011', - runtime: '94', - genres: ['Comedy', 'Fantasy', 'Romance'], - director: 'Woody Allen', - actors: 'Owen Wilson, Rachel McAdams, Kurt Fuller, Mimi Kennedy', - plot: "While on a trip to Paris with his fiancée's family, a nostalgic screenwriter finds himself mysteriously going back to the 1920s everyday at midnight.", - posterUrl: + }, + { + id: 38, + title: 'Midnight in Paris', + year: '2011', + runtime: '94', + genres: ['Comedy', 'Fantasy', 'Romance'], + director: 'Woody Allen', + actors: 'Owen Wilson, Rachel McAdams, Kurt Fuller, Mimi Kennedy', + plot: "While on a trip to Paris with his fiancée's family, a nostalgic screenwriter finds himself mysteriously going back to the 1920s everyday at midnight.", + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMTM4NjY1MDQwMl5BMl5BanBnXkFtZTcwNTI3Njg3NA@@._V1_SX300.jpg', - }, - { - id: 39, - title: 'Les Misérables', - year: '2012', - runtime: '158', - genres: ['Drama', 'Musical', 'Romance'], - director: 'Tom Hooper', - actors: 'Hugh Jackman, Russell Crowe, Anne Hathaway, Amanda Seyfried', - plot: "In 19th-century France, Jean Valjean, who for decades has been hunted by the ruthless policeman Javert after breaking parole, agrees to care for a factory worker's daughter. The decision changes their lives forever.", - posterUrl: + }, + { + id: 39, + title: 'Les Misérables', + year: '2012', + runtime: '158', + genres: ['Drama', 'Musical', 'Romance'], + director: 'Tom Hooper', + actors: 'Hugh Jackman, Russell Crowe, Anne Hathaway, Amanda Seyfried', + plot: "In 19th-century France, Jean Valjean, who for decades has been hunted by the ruthless policeman Javert after breaking parole, agrees to care for a factory worker's daughter. The decision changes their lives forever.", + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMTQ4NDI3NDg4M15BMl5BanBnXkFtZTcwMjY5OTI1OA@@._V1_SX300.jpg', - }, - { - id: 40, - title: 'L.A. Confidential', - year: '1997', - runtime: '138', - genres: ['Crime', 'Drama', 'Mystery'], - director: 'Curtis Hanson', - actors: 'Kevin Spacey, Russell Crowe, Guy Pearce, James Cromwell', - plot: 'As corruption grows in 1950s LA, three policemen - one strait-laced, one brutal, and one sleazy - investigate a series of murders with their own brand of justice.', - posterUrl: + }, + { + id: 40, + title: 'L.A. Confidential', + year: '1997', + runtime: '138', + genres: ['Crime', 'Drama', 'Mystery'], + director: 'Curtis Hanson', + actors: 'Kevin Spacey, Russell Crowe, Guy Pearce, James Cromwell', + plot: 'As corruption grows in 1950s LA, three policemen - one strait-laced, one brutal, and one sleazy - investigate a series of murders with their own brand of justice.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BNWEwNDhhNWUtYWMzNi00ZTNhLWFiZDAtMjBjZmJhMTU0ZTY2XkEyXkFqcGdeQXVyNDk3NzU2MTQ@._V1_SX300.jpg', - }, - { - id: 41, - title: 'Moneyball', - year: '2011', - runtime: '133', - genres: ['Biography', 'Drama', 'Sport'], - director: 'Bennett Miller', - actors: 'Brad Pitt, Jonah Hill, Philip Seymour Hoffman, Robin Wright', - plot: "Oakland A's general manager Billy Beane's successful attempt to assemble a baseball team on a lean budget by employing computer-generated analysis to acquire new players.", - posterUrl: + }, + { + id: 41, + title: 'Moneyball', + year: '2011', + runtime: '133', + genres: ['Biography', 'Drama', 'Sport'], + director: 'Bennett Miller', + actors: 'Brad Pitt, Jonah Hill, Philip Seymour Hoffman, Robin Wright', + plot: "Oakland A's general manager Billy Beane's successful attempt to assemble a baseball team on a lean budget by employing computer-generated analysis to acquire new players.", + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjAxOTU3Mzc1M15BMl5BanBnXkFtZTcwMzk1ODUzNg@@._V1_SX300.jpg', - }, - { - id: 42, - title: 'The Hangover', - year: '2009', - runtime: '100', - genres: ['Comedy'], - director: 'Todd Phillips', - actors: 'Bradley Cooper, Ed Helms, Zach Galifianakis, Justin Bartha', - plot: 'Three buddies wake up from a bachelor party in Las Vegas, with no memory of the previous night and the bachelor missing. They make their way around the city in order to find their friend before his wedding.', - posterUrl: + }, + { + id: 42, + title: 'The Hangover', + year: '2009', + runtime: '100', + genres: ['Comedy'], + director: 'Todd Phillips', + actors: 'Bradley Cooper, Ed Helms, Zach Galifianakis, Justin Bartha', + plot: 'Three buddies wake up from a bachelor party in Las Vegas, with no memory of the previous night and the bachelor missing. They make their way around the city in order to find their friend before his wedding.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTU1MDA1MTYwMF5BMl5BanBnXkFtZTcwMDcxMzA1Mg@@._V1_SX300.jpg', - }, - { - id: 43, - title: 'The Great Beauty', - year: '2013', - runtime: '141', - genres: ['Drama'], - director: 'Paolo Sorrentino', - actors: 'Toni Servillo, Carlo Verdone, Sabrina Ferilli, Carlo Buccirosso', - plot: 'Jep Gambardella has seduced his way through the lavish nightlife of Rome for decades, but after his 65th birthday and a shock from the past, Jep looks past the nightclubs and parties to find a timeless landscape of absurd, exquisite beauty.', - posterUrl: + }, + { + id: 43, + title: 'The Great Beauty', + year: '2013', + runtime: '141', + genres: ['Drama'], + director: 'Paolo Sorrentino', + actors: 'Toni Servillo, Carlo Verdone, Sabrina Ferilli, Carlo Buccirosso', + plot: 'Jep Gambardella has seduced his way through the lavish nightlife of Rome for decades, but after his 65th birthday and a shock from the past, Jep looks past the nightclubs and parties to find a timeless landscape of absurd, exquisite beauty.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTQ0ODg1OTQ2Nl5BMl5BanBnXkFtZTgwNTc2MDY1MDE@._V1_SX300.jpg', - }, - { - id: 44, - title: 'Gran Torino', - year: '2008', - runtime: '116', - genres: ['Drama'], - director: 'Clint Eastwood', - actors: 'Clint Eastwood, Christopher Carley, Bee Vang, Ahney Her', - plot: "Disgruntled Korean War veteran Walt Kowalski sets out to reform his neighbor, a Hmong teenager who tried to steal Kowalski's prized possession: a 1972 Gran Torino.", - posterUrl: + }, + { + id: 44, + title: 'Gran Torino', + year: '2008', + runtime: '116', + genres: ['Drama'], + director: 'Clint Eastwood', + actors: 'Clint Eastwood, Christopher Carley, Bee Vang, Ahney Her', + plot: "Disgruntled Korean War veteran Walt Kowalski sets out to reform his neighbor, a Hmong teenager who tried to steal Kowalski's prized possession: a 1972 Gran Torino.", + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMTQyMTczMTAxMl5BMl5BanBnXkFtZTcwOTc1ODE0Mg@@._V1_SX300.jpg', - }, - { - id: 45, - title: 'Mary and Max', - year: '2009', - runtime: '92', - genres: ['Animation', 'Comedy', 'Drama'], - director: 'Adam Elliot', - actors: 'Toni Collette, Philip Seymour Hoffman, Barry Humphries, Eric Bana', - plot: 'A tale of friendship between two unlikely pen pals: Mary, a lonely, eight-year-old girl living in the suburbs of Melbourne, and Max, a forty-four-year old, severely obese man living in New York.', - posterUrl: + }, + { + id: 45, + title: 'Mary and Max', + year: '2009', + runtime: '92', + genres: ['Animation', 'Comedy', 'Drama'], + director: 'Adam Elliot', + actors: 'Toni Collette, Philip Seymour Hoffman, Barry Humphries, Eric Bana', + plot: 'A tale of friendship between two unlikely pen pals: Mary, a lonely, eight-year-old girl living in the suburbs of Melbourne, and Max, a forty-four-year old, severely obese man living in New York.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTQ1NDIyNTA1Nl5BMl5BanBnXkFtZTcwMjc2Njk3OA@@._V1_SX300.jpg', - }, - { - id: 46, - title: 'Flight', - year: '2012', - runtime: '138', - genres: ['Drama', 'Thriller'], - director: 'Robert Zemeckis', - actors: 'Nadine Velazquez, Denzel Washington, Carter Cabassa, Adam C. Edwards', - plot: 'An airline pilot saves almost all his passengers on his malfunctioning airliner which eventually crashed, but an investigation into the accident reveals something troubling.', - posterUrl: + }, + { + id: 46, + title: 'Flight', + year: '2012', + runtime: '138', + genres: ['Drama', 'Thriller'], + director: 'Robert Zemeckis', + actors: 'Nadine Velazquez, Denzel Washington, Carter Cabassa, Adam C. Edwards', + plot: 'An airline pilot saves almost all his passengers on his malfunctioning airliner which eventually crashed, but an investigation into the accident reveals something troubling.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTUxMjI1OTMxNl5BMl5BanBnXkFtZTcwNjc3NTY1OA@@._V1_SX300.jpg', - }, - { - id: 47, - title: "One Flew Over the Cuckoo's Nest", - year: '1975', - runtime: '133', - genres: ['Drama'], - director: 'Milos Forman', - actors: 'Michael Berryman, Peter Brocco, Dean R. Brooks, Alonzo Brown', - plot: 'A criminal pleads insanity after getting into trouble again and once in the mental institution rebels against the oppressive nurse and rallies up the scared patients.', - posterUrl: + }, + { + id: 47, + title: "One Flew Over the Cuckoo's Nest", + year: '1975', + runtime: '133', + genres: ['Drama'], + director: 'Milos Forman', + actors: 'Michael Berryman, Peter Brocco, Dean R. Brooks, Alonzo Brown', + plot: 'A criminal pleads insanity after getting into trouble again and once in the mental institution rebels against the oppressive nurse and rallies up the scared patients.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BYmJkODkwOTItZThjZC00MTE0LWIxNzQtYTM3MmQwMGI1OWFiXkEyXkFqcGdeQXVyNjUwNzk3NDc@._V1_SX300.jpg', - }, - { - id: 48, - title: 'Requiem for a Dream', - year: '2000', - runtime: '102', - genres: ['Drama'], - director: 'Darren Aronofsky', - actors: 'Ellen Burstyn, Jared Leto, Jennifer Connelly, Marlon Wayans', - plot: 'The drug-induced utopias of four Coney Island people are shattered when their addictions run deep.', - posterUrl: + }, + { + id: 48, + title: 'Requiem for a Dream', + year: '2000', + runtime: '102', + genres: ['Drama'], + director: 'Darren Aronofsky', + actors: 'Ellen Burstyn, Jared Leto, Jennifer Connelly, Marlon Wayans', + plot: 'The drug-induced utopias of four Coney Island people are shattered when their addictions run deep.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTkzODMzODYwOF5BMl5BanBnXkFtZTcwODM2NjA2NQ@@._V1_SX300.jpg', - }, - { - id: 49, - title: 'The Truman Show', - year: '1998', - runtime: '103', - genres: ['Comedy', 'Drama', 'Sci-Fi'], - director: 'Peter Weir', - actors: 'Jim Carrey, Laura Linney, Noah Emmerich, Natascha McElhone', - plot: 'An insurance salesman/adjuster discovers his entire life is actually a television show.', - posterUrl: + }, + { + id: 49, + title: 'The Truman Show', + year: '1998', + runtime: '103', + genres: ['Comedy', 'Drama', 'Sci-Fi'], + director: 'Peter Weir', + actors: 'Jim Carrey, Laura Linney, Noah Emmerich, Natascha McElhone', + plot: 'An insurance salesman/adjuster discovers his entire life is actually a television show.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMDIzODcyY2EtMmY2MC00ZWVlLTgwMzAtMjQwOWUyNmJjNTYyXkEyXkFqcGdeQXVyNDk3NzU2MTQ@._V1_SX300.jpg', - }, - { - id: 50, - title: 'The Artist', - year: '2011', - runtime: '100', - genres: ['Comedy', 'Drama', 'Romance'], - director: 'Michel Hazanavicius', - actors: 'Jean Dujardin, Bérénice Bejo, John Goodman, James Cromwell', - plot: 'A silent movie star meets a young dancer, but the arrival of talking pictures sends their careers in opposite directions.', - posterUrl: + }, + { + id: 50, + title: 'The Artist', + year: '2011', + runtime: '100', + genres: ['Comedy', 'Drama', 'Romance'], + director: 'Michel Hazanavicius', + actors: 'Jean Dujardin, Bérénice Bejo, John Goodman, James Cromwell', + plot: 'A silent movie star meets a young dancer, but the arrival of talking pictures sends their careers in opposite directions.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMzk0NzQxMTM0OV5BMl5BanBnXkFtZTcwMzU4MDYyNQ@@._V1_SX300.jpg', - }, - { - id: 51, - title: 'Forrest Gump', - year: '1994', - runtime: '142', - genres: ['Comedy', 'Drama'], - director: 'Robert Zemeckis', - actors: 'Tom Hanks, Rebecca Williams, Sally Field, Michael Conner Humphreys', - plot: 'Forrest Gump, while not intelligent, has accidentally been present at many historic moments, but his true love, Jenny Curran, eludes him.', - posterUrl: + }, + { + id: 51, + title: 'Forrest Gump', + year: '1994', + runtime: '142', + genres: ['Comedy', 'Drama'], + director: 'Robert Zemeckis', + actors: 'Tom Hanks, Rebecca Williams, Sally Field, Michael Conner Humphreys', + plot: 'Forrest Gump, while not intelligent, has accidentally been present at many historic moments, but his true love, Jenny Curran, eludes him.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BYThjM2MwZGMtMzg3Ny00NGRkLWE4M2EtYTBiNWMzOTY0YTI4XkEyXkFqcGdeQXVyNDYyMDk5MTU@._V1_SX300.jpg', - }, - { - id: 52, - title: 'The Hobbit: The Desolation of Smaug', - year: '2013', - runtime: '161', - genres: ['Adventure', 'Fantasy'], - director: 'Peter Jackson', - actors: 'Ian McKellen, Martin Freeman, Richard Armitage, Ken Stott', - plot: 'The dwarves, along with Bilbo Baggins and Gandalf the Grey, continue their quest to reclaim Erebor, their homeland, from Smaug. Bilbo Baggins is in possession of a mysterious and magical ring.', - posterUrl: + }, + { + id: 52, + title: 'The Hobbit: The Desolation of Smaug', + year: '2013', + runtime: '161', + genres: ['Adventure', 'Fantasy'], + director: 'Peter Jackson', + actors: 'Ian McKellen, Martin Freeman, Richard Armitage, Ken Stott', + plot: 'The dwarves, along with Bilbo Baggins and Gandalf the Grey, continue their quest to reclaim Erebor, their homeland, from Smaug. Bilbo Baggins is in possession of a mysterious and magical ring.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMzU0NDY0NDEzNV5BMl5BanBnXkFtZTgwOTIxNDU1MDE@._V1_SX300.jpg', - }, - { - id: 53, - title: 'Vicky Cristina Barcelona', - year: '2008', - runtime: '96', - genres: ['Drama', 'Romance'], - director: 'Woody Allen', - actors: 'Rebecca Hall, Scarlett Johansson, Christopher Evan Welch, Chris Messina', - plot: 'Two girlfriends on a summer holiday in Spain become enamored with the same painter, unaware that his ex-wife, with whom he has a tempestuous relationship, is about to re-enter the picture.', - posterUrl: + }, + { + id: 53, + title: 'Vicky Cristina Barcelona', + year: '2008', + runtime: '96', + genres: ['Drama', 'Romance'], + director: 'Woody Allen', + actors: 'Rebecca Hall, Scarlett Johansson, Christopher Evan Welch, Chris Messina', + plot: 'Two girlfriends on a summer holiday in Spain become enamored with the same painter, unaware that his ex-wife, with whom he has a tempestuous relationship, is about to re-enter the picture.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTU2NDQ4MTg2MV5BMl5BanBnXkFtZTcwNDUzNjU3MQ@@._V1_SX300.jpg', - }, - { - id: 54, - title: 'Slumdog Millionaire', - year: '2008', - runtime: '120', - genres: ['Drama', 'Romance'], - director: 'Danny Boyle, Loveleen Tandan', - actors: 'Dev Patel, Saurabh Shukla, Anil Kapoor, Rajendranath Zutshi', - plot: 'A Mumbai teen reflects on his upbringing in the slums when he is accused of cheating on the Indian Version of "Who Wants to be a Millionaire?"', - posterUrl: + }, + { + id: 54, + title: 'Slumdog Millionaire', + year: '2008', + runtime: '120', + genres: ['Drama', 'Romance'], + director: 'Danny Boyle, Loveleen Tandan', + actors: 'Dev Patel, Saurabh Shukla, Anil Kapoor, Rajendranath Zutshi', + plot: 'A Mumbai teen reflects on his upbringing in the slums when he is accused of cheating on the Indian Version of "Who Wants to be a Millionaire?"', + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMTU2NTA5NzI0N15BMl5BanBnXkFtZTcwMjUxMjYxMg@@._V1_SX300.jpg', - }, - { - id: 55, - title: 'Lost in Translation', - year: '2003', - runtime: '101', - genres: ['Drama'], - director: 'Sofia Coppola', - actors: 'Scarlett Johansson, Bill Murray, Akiko Takeshita, Kazuyoshi Minamimagoe', - plot: 'A faded movie star and a neglected young woman form an unlikely bond after crossing paths in Tokyo.', - posterUrl: + }, + { + id: 55, + title: 'Lost in Translation', + year: '2003', + runtime: '101', + genres: ['Drama'], + director: 'Sofia Coppola', + actors: 'Scarlett Johansson, Bill Murray, Akiko Takeshita, Kazuyoshi Minamimagoe', + plot: 'A faded movie star and a neglected young woman form an unlikely bond after crossing paths in Tokyo.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTI2NDI5ODk4N15BMl5BanBnXkFtZTYwMTI3NTE3._V1_SX300.jpg', - }, - { - id: 56, - title: 'Match Point', - year: '2005', - runtime: '119', - genres: ['Drama', 'Romance', 'Thriller'], - director: 'Woody Allen', - actors: 'Jonathan Rhys Meyers, Alexander Armstrong, Paul Kaye, Matthew Goode', - plot: 'At a turning point in his life, a former tennis pro falls for an actress who happens to be dating his friend and soon-to-be brother-in-law.', - posterUrl: + }, + { + id: 56, + title: 'Match Point', + year: '2005', + runtime: '119', + genres: ['Drama', 'Romance', 'Thriller'], + director: 'Woody Allen', + actors: 'Jonathan Rhys Meyers, Alexander Armstrong, Paul Kaye, Matthew Goode', + plot: 'At a turning point in his life, a former tennis pro falls for an actress who happens to be dating his friend and soon-to-be brother-in-law.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTMzNzY4MzE5NF5BMl5BanBnXkFtZTcwMzQ1MDMzMQ@@._V1_SX300.jpg', - }, - { - id: 57, - title: 'Psycho', - year: '1960', - runtime: '109', - genres: ['Horror', 'Mystery', 'Thriller'], - director: 'Alfred Hitchcock', - actors: 'Anthony Perkins, Vera Miles, John Gavin, Janet Leigh', - plot: "A Phoenix secretary embezzles $40,000 from her employer's client, goes on the run, and checks into a remote motel run by a young man under the domination of his mother.", - posterUrl: + }, + { + id: 57, + title: 'Psycho', + year: '1960', + runtime: '109', + genres: ['Horror', 'Mystery', 'Thriller'], + director: 'Alfred Hitchcock', + actors: 'Anthony Perkins, Vera Miles, John Gavin, Janet Leigh', + plot: "A Phoenix secretary embezzles $40,000 from her employer's client, goes on the run, and checks into a remote motel run by a young man under the domination of his mother.", + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMDI3OWRmOTEtOWJhYi00N2JkLTgwNGItMjdkN2U0NjFiZTYwXkEyXkFqcGdeQXVyMTQxNzMzNDI@._V1_SX300.jpg', - }, - { - id: 58, - title: 'North by Northwest', - year: '1959', - runtime: '136', - genres: ['Action', 'Adventure', 'Crime'], - director: 'Alfred Hitchcock', - actors: 'Cary Grant, Eva Marie Saint, James Mason, Jessie Royce Landis', - plot: 'A hapless New York advertising executive is mistaken for a government agent by a group of foreign spies, and is pursued across the country while he looks for a way to survive.', - posterUrl: + }, + { + id: 58, + title: 'North by Northwest', + year: '1959', + runtime: '136', + genres: ['Action', 'Adventure', 'Crime'], + director: 'Alfred Hitchcock', + actors: 'Cary Grant, Eva Marie Saint, James Mason, Jessie Royce Landis', + plot: 'A hapless New York advertising executive is mistaken for a government agent by a group of foreign spies, and is pursued across the country while he looks for a way to survive.', + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMjQwMTQ0MzgwNl5BMl5BanBnXkFtZTgwNjc4ODE4MzE@._V1_SX300.jpg', - }, - { - id: 59, - title: 'Madagascar: Escape 2 Africa', - year: '2008', - runtime: '89', - genres: ['Animation', 'Action', 'Adventure'], - director: 'Eric Darnell, Tom McGrath', - actors: 'Ben Stiller, Chris Rock, David Schwimmer, Jada Pinkett Smith', - plot: 'The animals try to fly back to New York City, but crash-land on an African wildlife refuge, where Alex is reunited with his parents.', - posterUrl: + }, + { + id: 59, + title: 'Madagascar: Escape 2 Africa', + year: '2008', + runtime: '89', + genres: ['Animation', 'Action', 'Adventure'], + director: 'Eric Darnell, Tom McGrath', + actors: 'Ben Stiller, Chris Rock, David Schwimmer, Jada Pinkett Smith', + plot: 'The animals try to fly back to New York City, but crash-land on an African wildlife refuge, where Alex is reunited with his parents.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjExMDA4NDcwMl5BMl5BanBnXkFtZTcwODAxNTQ3MQ@@._V1_SX300.jpg', - }, - { - id: 60, - title: 'Despicable Me 2', - year: '2013', - runtime: '98', - genres: ['Animation', 'Adventure', 'Comedy'], - director: 'Pierre Coffin, Chris Renaud', - actors: 'Steve Carell, Kristen Wiig, Benjamin Bratt, Miranda Cosgrove', - plot: "When Gru, the world's most super-bad turned super-dad has been recruited by a team of officials to stop lethal muscle and a host of Gru's own, He has to fight back with new gadgetry, cars, and more minion madness.", - posterUrl: + }, + { + id: 60, + title: 'Despicable Me 2', + year: '2013', + runtime: '98', + genres: ['Animation', 'Adventure', 'Comedy'], + director: 'Pierre Coffin, Chris Renaud', + actors: 'Steve Carell, Kristen Wiig, Benjamin Bratt, Miranda Cosgrove', + plot: "When Gru, the world's most super-bad turned super-dad has been recruited by a team of officials to stop lethal muscle and a host of Gru's own, He has to fight back with new gadgetry, cars, and more minion madness.", + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjExNjAyNTcyMF5BMl5BanBnXkFtZTgwODQzMjQ3MDE@._V1_SX300.jpg', - }, - { - id: 61, - title: 'Downfall', - year: '2004', - runtime: '156', - genres: ['Biography', 'Drama', 'History'], - director: 'Oliver Hirschbiegel', - actors: 'Bruno Ganz, Alexandra Maria Lara, Corinna Harfouch, Ulrich Matthes', - plot: "Traudl Junge, the final secretary for Adolf Hitler, tells of the Nazi dictator's final days in his Berlin bunker at the end of WWII.", - posterUrl: + }, + { + id: 61, + title: 'Downfall', + year: '2004', + runtime: '156', + genres: ['Biography', 'Drama', 'History'], + director: 'Oliver Hirschbiegel', + actors: 'Bruno Ganz, Alexandra Maria Lara, Corinna Harfouch, Ulrich Matthes', + plot: "Traudl Junge, the final secretary for Adolf Hitler, tells of the Nazi dictator's final days in his Berlin bunker at the end of WWII.", + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTM1OTI1MjE2Nl5BMl5BanBnXkFtZTcwMTEwMzc4NA@@._V1_SX300.jpg', - }, - { - id: 62, - title: 'Madagascar', - year: '2005', - runtime: '86', - genres: ['Animation', 'Adventure', 'Comedy'], - director: 'Eric Darnell, Tom McGrath', - actors: 'Ben Stiller, Chris Rock, David Schwimmer, Jada Pinkett Smith', - plot: 'Spoiled by their upbringing with no idea what wild life is really like, four animals from New York Central Zoo escape, unwittingly assisted by four absconding penguins, and find themselves in Madagascar, among a bunch of merry lemurs', - posterUrl: + }, + { + id: 62, + title: 'Madagascar', + year: '2005', + runtime: '86', + genres: ['Animation', 'Adventure', 'Comedy'], + director: 'Eric Darnell, Tom McGrath', + actors: 'Ben Stiller, Chris Rock, David Schwimmer, Jada Pinkett Smith', + plot: 'Spoiled by their upbringing with no idea what wild life is really like, four animals from New York Central Zoo escape, unwittingly assisted by four absconding penguins, and find themselves in Madagascar, among a bunch of merry lemurs', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTY4NDUwMzQxMF5BMl5BanBnXkFtZTcwMDgwNjgyMQ@@._V1_SX300.jpg', - }, - { - id: 63, - title: "Madagascar 3: Europe's Most Wanted", - year: '2012', - runtime: '93', - genres: ['Animation', 'Adventure', 'Comedy'], - director: 'Eric Darnell, Tom McGrath, Conrad Vernon', - actors: 'Ben Stiller, Chris Rock, David Schwimmer, Jada Pinkett Smith', - plot: 'Alex, Marty, Gloria and Melman are still fighting to get home to their beloved Big Apple. Their journey takes them through Europe where they find the perfect cover: a traveling circus, which they reinvent - Madagascar style.', - posterUrl: + }, + { + id: 63, + title: "Madagascar 3: Europe's Most Wanted", + year: '2012', + runtime: '93', + genres: ['Animation', 'Adventure', 'Comedy'], + director: 'Eric Darnell, Tom McGrath, Conrad Vernon', + actors: 'Ben Stiller, Chris Rock, David Schwimmer, Jada Pinkett Smith', + plot: 'Alex, Marty, Gloria and Melman are still fighting to get home to their beloved Big Apple. Their journey takes them through Europe where they find the perfect cover: a traveling circus, which they reinvent - Madagascar style.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTM2MTIzNzk2MF5BMl5BanBnXkFtZTcwMDcwMzQxNw@@._V1_SX300.jpg', - }, - { - id: 64, - title: 'God Bless America', - year: '2011', - runtime: '105', - genres: ['Comedy', 'Crime'], - director: 'Bobcat Goldthwait', - actors: 'Joel Murray, Tara Lynne Barr, Melinda Page Hamilton, Mackenzie Brooke Smith', - plot: 'On a mission to rid society of its most repellent citizens, terminally ill Frank makes an unlikely accomplice in 16-year-old Roxy.', - posterUrl: + }, + { + id: 64, + title: 'God Bless America', + year: '2011', + runtime: '105', + genres: ['Comedy', 'Crime'], + director: 'Bobcat Goldthwait', + actors: 'Joel Murray, Tara Lynne Barr, Melinda Page Hamilton, Mackenzie Brooke Smith', + plot: 'On a mission to rid society of its most repellent citizens, terminally ill Frank makes an unlikely accomplice in 16-year-old Roxy.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTQwMTc1MzA4NF5BMl5BanBnXkFtZTcwNzQwMTgzNw@@._V1_SX300.jpg', - }, - { - id: 65, - title: 'The Social Network', - year: '2010', - runtime: '120', - genres: ['Biography', 'Drama'], - director: 'David Fincher', - actors: 'Jesse Eisenberg, Rooney Mara, Bryan Barter, Dustin Fitzsimons', - plot: 'Harvard student Mark Zuckerberg creates the social networking site that would become known as Facebook, but is later sued by two brothers who claimed he stole their idea, and the co-founder who was later squeezed out of the business.', - posterUrl: + }, + { + id: 65, + title: 'The Social Network', + year: '2010', + runtime: '120', + genres: ['Biography', 'Drama'], + director: 'David Fincher', + actors: 'Jesse Eisenberg, Rooney Mara, Bryan Barter, Dustin Fitzsimons', + plot: 'Harvard student Mark Zuckerberg creates the social networking site that would become known as Facebook, but is later sued by two brothers who claimed he stole their idea, and the co-founder who was later squeezed out of the business.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTM2ODk0NDAwMF5BMl5BanBnXkFtZTcwNTM1MDc2Mw@@._V1_SX300.jpg', - }, - { - id: 66, - title: 'The Pianist', - year: '2002', - runtime: '150', - genres: ['Biography', 'Drama', 'War'], - director: 'Roman Polanski', - actors: 'Adrien Brody, Emilia Fox, Michal Zebrowski, Ed Stoppard', - plot: 'A Polish Jewish musician struggles to survive the destruction of the Warsaw ghetto of World War II.', - posterUrl: + }, + { + id: 66, + title: 'The Pianist', + year: '2002', + runtime: '150', + genres: ['Biography', 'Drama', 'War'], + director: 'Roman Polanski', + actors: 'Adrien Brody, Emilia Fox, Michal Zebrowski, Ed Stoppard', + plot: 'A Polish Jewish musician struggles to survive the destruction of the Warsaw ghetto of World War II.', + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMTc4OTkyOTA3OF5BMl5BanBnXkFtZTYwMDIxNjk5._V1_SX300.jpg', - }, - { - id: 67, - title: 'Alive', - year: '1993', - runtime: '120', - genres: ['Adventure', 'Biography', 'Drama'], - director: 'Frank Marshall', - actors: 'Ethan Hawke, Vincent Spano, Josh Hamilton, Bruce Ramsay', - plot: 'Uruguayan rugby team stranded in the snow swept Andes are forced to use desperate measures to survive after a plane crash.', - posterUrl: '', - }, - { - id: 68, - title: 'Casablanca', - year: '1942', - runtime: '102', - genres: ['Drama', 'Romance', 'War'], - director: 'Michael Curtiz', - actors: 'Humphrey Bogart, Ingrid Bergman, Paul Henreid, Claude Rains', - plot: 'In Casablanca, Morocco in December 1941, a cynical American expatriate meets a former lover, with unforeseen complications.', - posterUrl: + }, + { + id: 67, + title: 'Alive', + year: '1993', + runtime: '120', + genres: ['Adventure', 'Biography', 'Drama'], + director: 'Frank Marshall', + actors: 'Ethan Hawke, Vincent Spano, Josh Hamilton, Bruce Ramsay', + plot: 'Uruguayan rugby team stranded in the snow swept Andes are forced to use desperate measures to survive after a plane crash.', + posterUrl: '', + }, + { + id: 68, + title: 'Casablanca', + year: '1942', + runtime: '102', + genres: ['Drama', 'Romance', 'War'], + director: 'Michael Curtiz', + actors: 'Humphrey Bogart, Ingrid Bergman, Paul Henreid, Claude Rains', + plot: 'In Casablanca, Morocco in December 1941, a cynical American expatriate meets a former lover, with unforeseen complications.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjQwNDYyNTk2N15BMl5BanBnXkFtZTgwMjQ0OTMyMjE@._V1_SX300.jpg', - }, - { - id: 69, - title: 'American Gangster', - year: '2007', - runtime: '157', - genres: ['Biography', 'Crime', 'Drama'], - director: 'Ridley Scott', - actors: 'Denzel Washington, Russell Crowe, Chiwetel Ejiofor, Josh Brolin', - plot: 'In 1970s America, a detective works to bring down the drug empire of Frank Lucas, a heroin kingpin from Manhattan, who is smuggling the drug into the country from the Far East.', - posterUrl: + }, + { + id: 69, + title: 'American Gangster', + year: '2007', + runtime: '157', + genres: ['Biography', 'Crime', 'Drama'], + director: 'Ridley Scott', + actors: 'Denzel Washington, Russell Crowe, Chiwetel Ejiofor, Josh Brolin', + plot: 'In 1970s America, a detective works to bring down the drug empire of Frank Lucas, a heroin kingpin from Manhattan, who is smuggling the drug into the country from the Far East.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTkyNzY5MDA5MV5BMl5BanBnXkFtZTcwMjg4MzI3MQ@@._V1_SX300.jpg', - }, - { - id: 70, - title: 'Catch Me If You Can', - year: '2002', - runtime: '141', - genres: ['Biography', 'Crime', 'Drama'], - director: 'Steven Spielberg', - actors: 'Leonardo DiCaprio, Tom Hanks, Christopher Walken, Martin Sheen', - plot: "The true story of Frank Abagnale Jr. who, before his 19th birthday, successfully conned millions of dollars' worth of checks as a Pan Am pilot, doctor, and legal prosecutor.", - posterUrl: + }, + { + id: 70, + title: 'Catch Me If You Can', + year: '2002', + runtime: '141', + genres: ['Biography', 'Crime', 'Drama'], + director: 'Steven Spielberg', + actors: 'Leonardo DiCaprio, Tom Hanks, Christopher Walken, Martin Sheen', + plot: "The true story of Frank Abagnale Jr. who, before his 19th birthday, successfully conned millions of dollars' worth of checks as a Pan Am pilot, doctor, and legal prosecutor.", + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTY5MzYzNjc5NV5BMl5BanBnXkFtZTYwNTUyNTc2._V1_SX300.jpg', - }, - { - id: 71, - title: 'American History X', - year: '1998', - runtime: '119', - genres: ['Crime', 'Drama'], - director: 'Tony Kaye', - actors: "Edward Norton, Edward Furlong, Beverly D'Angelo, Jennifer Lien", - plot: 'A former neo-nazi skinhead tries to prevent his younger brother from going down the same wrong path that he did.', - posterUrl: + }, + { + id: 71, + title: 'American History X', + year: '1998', + runtime: '119', + genres: ['Crime', 'Drama'], + director: 'Tony Kaye', + actors: "Edward Norton, Edward Furlong, Beverly D'Angelo, Jennifer Lien", + plot: 'A former neo-nazi skinhead tries to prevent his younger brother from going down the same wrong path that he did.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BZjA0MTM4MTQtNzY5MC00NzY3LWI1ZTgtYzcxMjkyMzU4MDZiXkEyXkFqcGdeQXVyNDYyMDk5MTU@._V1_SX300.jpg', - }, - { - id: 72, - title: 'Casino', - year: '1995', - runtime: '178', - genres: ['Biography', 'Crime', 'Drama'], - director: 'Martin Scorsese', - actors: 'Robert De Niro, Sharon Stone, Joe Pesci, James Woods', - plot: 'Greed, deception, money, power, and murder occur between two best friends, a mafia underboss and a casino owner, for a trophy wife over a gambling empire.', - posterUrl: + }, + { + id: 72, + title: 'Casino', + year: '1995', + runtime: '178', + genres: ['Biography', 'Crime', 'Drama'], + director: 'Martin Scorsese', + actors: 'Robert De Niro, Sharon Stone, Joe Pesci, James Woods', + plot: 'Greed, deception, money, power, and murder occur between two best friends, a mafia underboss and a casino owner, for a trophy wife over a gambling empire.', + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMTcxOWYzNDYtYmM4YS00N2NkLTk0NTAtNjg1ODgwZjAxYzI3XkEyXkFqcGdeQXVyNTA4NzY1MzY@._V1_SX300.jpg', - }, - { - id: 73, - title: "Pirates of the Caribbean: At World's End", - year: '2007', - runtime: '169', - genres: ['Action', 'Adventure', 'Fantasy'], - director: 'Gore Verbinski', - actors: 'Johnny Depp, Geoffrey Rush, Orlando Bloom, Keira Knightley', - plot: 'Captain Barbossa, Will Turner and Elizabeth Swann must sail off the edge of the map, navigate treachery and betrayal, find Jack Sparrow, and make their final alliances for one last decisive battle.', - posterUrl: + }, + { + id: 73, + title: "Pirates of the Caribbean: At World's End", + year: '2007', + runtime: '169', + genres: ['Action', 'Adventure', 'Fantasy'], + director: 'Gore Verbinski', + actors: 'Johnny Depp, Geoffrey Rush, Orlando Bloom, Keira Knightley', + plot: 'Captain Barbossa, Will Turner and Elizabeth Swann must sail off the edge of the map, navigate treachery and betrayal, find Jack Sparrow, and make their final alliances for one last decisive battle.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjIyNjkxNzEyMl5BMl5BanBnXkFtZTYwMjc3MDE3._V1_SX300.jpg', - }, - { - id: 74, - title: 'Pirates of the Caribbean: On Stranger Tides', - year: '2011', - runtime: '136', - genres: ['Action', 'Adventure', 'Fantasy'], - director: 'Rob Marshall', - actors: 'Johnny Depp, Penélope Cruz, Geoffrey Rush, Ian McShane', - plot: 'Jack Sparrow and Barbossa embark on a quest to find the elusive fountain of youth, only to discover that Blackbeard and his daughter are after it too.', - posterUrl: + }, + { + id: 74, + title: 'Pirates of the Caribbean: On Stranger Tides', + year: '2011', + runtime: '136', + genres: ['Action', 'Adventure', 'Fantasy'], + director: 'Rob Marshall', + actors: 'Johnny Depp, Penélope Cruz, Geoffrey Rush, Ian McShane', + plot: 'Jack Sparrow and Barbossa embark on a quest to find the elusive fountain of youth, only to discover that Blackbeard and his daughter are after it too.', + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMjE5MjkwODI3Nl5BMl5BanBnXkFtZTcwNjcwMDk4NA@@._V1_SX300.jpg', - }, - { - id: 75, - title: 'Crash', - year: '2004', - runtime: '112', - genres: ['Crime', 'Drama', 'Thriller'], - director: 'Paul Haggis', - actors: 'Karina Arroyave, Dato Bakhtadze, Sandra Bullock, Don Cheadle', - plot: 'Los Angeles citizens with vastly separate lives collide in interweaving stories of race, loss and redemption.', - posterUrl: + }, + { + id: 75, + title: 'Crash', + year: '2004', + runtime: '112', + genres: ['Crime', 'Drama', 'Thriller'], + director: 'Paul Haggis', + actors: 'Karina Arroyave, Dato Bakhtadze, Sandra Bullock, Don Cheadle', + plot: 'Los Angeles citizens with vastly separate lives collide in interweaving stories of race, loss and redemption.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BOTk1OTA1MjIyNV5BMl5BanBnXkFtZTcwODQxMTkyMQ@@._V1_SX300.jpg', - }, - { - id: 76, - title: 'Pirates of the Caribbean: The Curse of the Black Pearl', - year: '2003', - runtime: '143', - genres: ['Action', 'Adventure', 'Fantasy'], - director: 'Gore Verbinski', - actors: 'Johnny Depp, Geoffrey Rush, Orlando Bloom, Keira Knightley', - plot: 'Blacksmith Will Turner teams up with eccentric pirate "Captain" Jack Sparrow to save his love, the governor\'s daughter, from Jack\'s former pirate allies, who are now undead.', - posterUrl: + }, + { + id: 76, + title: 'Pirates of the Caribbean: The Curse of the Black Pearl', + year: '2003', + runtime: '143', + genres: ['Action', 'Adventure', 'Fantasy'], + director: 'Gore Verbinski', + actors: 'Johnny Depp, Geoffrey Rush, Orlando Bloom, Keira Knightley', + plot: 'Blacksmith Will Turner teams up with eccentric pirate "Captain" Jack Sparrow to save his love, the governor\'s daughter, from Jack\'s former pirate allies, who are now undead.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjAyNDM4MTc2N15BMl5BanBnXkFtZTYwNDk0Mjc3._V1_SX300.jpg', - }, - { - id: 77, - title: 'The Lord of the Rings: The Return of the King', - year: '2003', - runtime: '201', - genres: ['Action', 'Adventure', 'Drama'], - director: 'Peter Jackson', - actors: 'Noel Appleby, Ali Astin, Sean Astin, David Aston', - plot: "Gandalf and Aragorn lead the World of Men against Sauron's army to draw his gaze from Frodo and Sam as they approach Mount Doom with the One Ring.", - posterUrl: + }, + { + id: 77, + title: 'The Lord of the Rings: The Return of the King', + year: '2003', + runtime: '201', + genres: ['Action', 'Adventure', 'Drama'], + director: 'Peter Jackson', + actors: 'Noel Appleby, Ali Astin, Sean Astin, David Aston', + plot: "Gandalf and Aragorn lead the World of Men against Sauron's army to draw his gaze from Frodo and Sam as they approach Mount Doom with the One Ring.", + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjE4MjA1NTAyMV5BMl5BanBnXkFtZTcwNzM1NDQyMQ@@._V1_SX300.jpg', - }, - { - id: 78, - title: 'Oldboy', - year: '2003', - runtime: '120', - genres: ['Drama', 'Mystery', 'Thriller'], - director: 'Chan-wook Park', - actors: 'Min-sik Choi, Ji-tae Yu, Hye-jeong Kang, Dae-han Ji', - plot: 'After being kidnapped and imprisoned for 15 years, Oh Dae-Su is released, only to find that he must find his captor in 5 days.', - posterUrl: + }, + { + id: 78, + title: 'Oldboy', + year: '2003', + runtime: '120', + genres: ['Drama', 'Mystery', 'Thriller'], + director: 'Chan-wook Park', + actors: 'Min-sik Choi, Ji-tae Yu, Hye-jeong Kang, Dae-han Ji', + plot: 'After being kidnapped and imprisoned for 15 years, Oh Dae-Su is released, only to find that he must find his captor in 5 days.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTI3NTQyMzU5M15BMl5BanBnXkFtZTcwMTM2MjgyMQ@@._V1_SX300.jpg', - }, - { - id: 79, - title: 'Chocolat', - year: '2000', - runtime: '121', - genres: ['Drama', 'Romance'], - director: 'Lasse Hallström', - actors: 'Alfred Molina, Carrie-Anne Moss, Aurelien Parent Koenig, Antonio Gil', - plot: 'A woman and her daughter open a chocolate shop in a small French village that shakes up the rigid morality of the community.', - posterUrl: + }, + { + id: 79, + title: 'Chocolat', + year: '2000', + runtime: '121', + genres: ['Drama', 'Romance'], + director: 'Lasse Hallström', + actors: 'Alfred Molina, Carrie-Anne Moss, Aurelien Parent Koenig, Antonio Gil', + plot: 'A woman and her daughter open a chocolate shop in a small French village that shakes up the rigid morality of the community.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjA4MDI3NTQwMV5BMl5BanBnXkFtZTcwNjIzNDcyMQ@@._V1_SX300.jpg', - }, - { - id: 80, - title: 'Casino Royale', - year: '2006', - runtime: '144', - genres: ['Action', 'Adventure', 'Thriller'], - director: 'Martin Campbell', - actors: 'Daniel Craig, Eva Green, Mads Mikkelsen, Judi Dench', - plot: 'Armed with a licence to kill, Secret Agent James Bond sets out on his first mission as 007 and must defeat a weapons dealer in a high stakes game of poker at Casino Royale, but things are not what they seem.', - posterUrl: + }, + { + id: 80, + title: 'Casino Royale', + year: '2006', + runtime: '144', + genres: ['Action', 'Adventure', 'Thriller'], + director: 'Martin Campbell', + actors: 'Daniel Craig, Eva Green, Mads Mikkelsen, Judi Dench', + plot: 'Armed with a licence to kill, Secret Agent James Bond sets out on his first mission as 007 and must defeat a weapons dealer in a high stakes game of poker at Casino Royale, but things are not what they seem.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTM5MjI4NDExNF5BMl5BanBnXkFtZTcwMDM1MjMzMQ@@._V1_SX300.jpg', - }, - { - id: 81, - title: 'WALL·E', - year: '2008', - runtime: '98', - genres: ['Animation', 'Adventure', 'Family'], - director: 'Andrew Stanton', - actors: 'Ben Burtt, Elissa Knight, Jeff Garlin, Fred Willard', - plot: 'In the distant future, a small waste-collecting robot inadvertently embarks on a space journey that will ultimately decide the fate of mankind.', - posterUrl: + }, + { + id: 81, + title: 'WALL·E', + year: '2008', + runtime: '98', + genres: ['Animation', 'Adventure', 'Family'], + director: 'Andrew Stanton', + actors: 'Ben Burtt, Elissa Knight, Jeff Garlin, Fred Willard', + plot: 'In the distant future, a small waste-collecting robot inadvertently embarks on a space journey that will ultimately decide the fate of mankind.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTczOTA3MzY2N15BMl5BanBnXkFtZTcwOTYwNjE2MQ@@._V1_SX300.jpg', - }, - { - id: 82, - title: 'The Wolf of Wall Street', - year: '2013', - runtime: '180', - genres: ['Biography', 'Comedy', 'Crime'], - director: 'Martin Scorsese', - actors: 'Leonardo DiCaprio, Jonah Hill, Margot Robbie, Matthew McConaughey', - plot: 'Based on the true story of Jordan Belfort, from his rise to a wealthy stock-broker living the high life to his fall involving crime, corruption and the federal government.', - posterUrl: + }, + { + id: 82, + title: 'The Wolf of Wall Street', + year: '2013', + runtime: '180', + genres: ['Biography', 'Comedy', 'Crime'], + director: 'Martin Scorsese', + actors: 'Leonardo DiCaprio, Jonah Hill, Margot Robbie, Matthew McConaughey', + plot: 'Based on the true story of Jordan Belfort, from his rise to a wealthy stock-broker living the high life to his fall involving crime, corruption and the federal government.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjIxMjgxNTk0MF5BMl5BanBnXkFtZTgwNjIyOTg2MDE@._V1_SX300.jpg', - }, - { - id: 83, - title: 'Hellboy II: The Golden Army', - year: '2008', - runtime: '120', - genres: ['Action', 'Adventure', 'Fantasy'], - director: 'Guillermo del Toro', - actors: 'Ron Perlman, Selma Blair, Doug Jones, John Alexander', - plot: 'The mythical world starts a rebellion against humanity in order to rule the Earth, so Hellboy and his team must save the world from the rebellious creatures.', - posterUrl: + }, + { + id: 83, + title: 'Hellboy II: The Golden Army', + year: '2008', + runtime: '120', + genres: ['Action', 'Adventure', 'Fantasy'], + director: 'Guillermo del Toro', + actors: 'Ron Perlman, Selma Blair, Doug Jones, John Alexander', + plot: 'The mythical world starts a rebellion against humanity in order to rule the Earth, so Hellboy and his team must save the world from the rebellious creatures.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjA5NzgyMjc2Nl5BMl5BanBnXkFtZTcwOTU3MDI3MQ@@._V1_SX300.jpg', - }, - { - id: 84, - title: 'Sunset Boulevard', - year: '1950', - runtime: '110', - genres: ['Drama', 'Film-Noir', 'Romance'], - director: 'Billy Wilder', - actors: 'William Holden, Gloria Swanson, Erich von Stroheim, Nancy Olson', - plot: 'A hack screenwriter writes a screenplay for a former silent-film star who has faded into Hollywood obscurity.', - posterUrl: + }, + { + id: 84, + title: 'Sunset Boulevard', + year: '1950', + runtime: '110', + genres: ['Drama', 'Film-Noir', 'Romance'], + director: 'Billy Wilder', + actors: 'William Holden, Gloria Swanson, Erich von Stroheim, Nancy Olson', + plot: 'A hack screenwriter writes a screenplay for a former silent-film star who has faded into Hollywood obscurity.', + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMTc3NDYzODAwNV5BMl5BanBnXkFtZTgwODg1MTczMTE@._V1_SX300.jpg', - }, - { - id: 85, - title: 'I-See-You.Com', - year: '2006', - runtime: '92', - genres: ['Comedy'], - director: 'Eric Steven Stahl', - actors: 'Beau Bridges, Rosanna Arquette, Mathew Botuchis, Shiri Appleby', - plot: 'A 17-year-old boy buys mini-cameras and displays the footage online at I-see-you.com. The cash rolls in as the site becomes a major hit. Everyone seems to have fun until it all comes crashing down....', - posterUrl: + }, + { + id: 85, + title: 'I-See-You.Com', + year: '2006', + runtime: '92', + genres: ['Comedy'], + director: 'Eric Steven Stahl', + actors: 'Beau Bridges, Rosanna Arquette, Mathew Botuchis, Shiri Appleby', + plot: 'A 17-year-old boy buys mini-cameras and displays the footage online at I-see-you.com. The cash rolls in as the site becomes a major hit. Everyone seems to have fun until it all comes crashing down....', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTYwMDUzNzA5Nl5BMl5BanBnXkFtZTcwMjQ2Njk3MQ@@._V1_SX300.jpg', - }, - { - id: 86, - title: 'The Grand Budapest Hotel', - year: '2014', - runtime: '99', - genres: ['Adventure', 'Comedy', 'Crime'], - director: 'Wes Anderson', - actors: 'Ralph Fiennes, F. Murray Abraham, Mathieu Amalric, Adrien Brody', - plot: 'The adventures of Gustave H, a legendary concierge at a famous hotel from the fictional Republic of Zubrowka between the first and second World Wars, and Zero Moustafa, the lobby boy who becomes his most trusted friend.', - posterUrl: + }, + { + id: 86, + title: 'The Grand Budapest Hotel', + year: '2014', + runtime: '99', + genres: ['Adventure', 'Comedy', 'Crime'], + director: 'Wes Anderson', + actors: 'Ralph Fiennes, F. Murray Abraham, Mathieu Amalric, Adrien Brody', + plot: 'The adventures of Gustave H, a legendary concierge at a famous hotel from the fictional Republic of Zubrowka between the first and second World Wars, and Zero Moustafa, the lobby boy who becomes his most trusted friend.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMzM5NjUxOTEyMl5BMl5BanBnXkFtZTgwNjEyMDM0MDE@._V1_SX300.jpg', - }, - { - id: 87, - title: "The Hitchhiker's Guide to the Galaxy", - year: '2005', - runtime: '109', - genres: ['Adventure', 'Comedy', 'Sci-Fi'], - director: 'Garth Jennings', - actors: 'Bill Bailey, Anna Chancellor, Warwick Davis, Yasiin Bey', - plot: 'Mere seconds before the Earth is to be demolished by an alien construction crew, journeyman Arthur Dent is swept off the planet by his friend Ford Prefect, a researcher penning a new edition of "The Hitchhiker\'s Guide to the Galaxy."', - posterUrl: + }, + { + id: 87, + title: "The Hitchhiker's Guide to the Galaxy", + year: '2005', + runtime: '109', + genres: ['Adventure', 'Comedy', 'Sci-Fi'], + director: 'Garth Jennings', + actors: 'Bill Bailey, Anna Chancellor, Warwick Davis, Yasiin Bey', + plot: 'Mere seconds before the Earth is to be demolished by an alien construction crew, journeyman Arthur Dent is swept off the planet by his friend Ford Prefect, a researcher penning a new edition of "The Hitchhiker\'s Guide to the Galaxy."', + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMjEwOTk4NjU2MF5BMl5BanBnXkFtZTYwMDA3NzI3._V1_SX300.jpg', - }, - { - id: 88, - title: 'Once Upon a Time in America', - year: '1984', - runtime: '229', - genres: ['Crime', 'Drama'], - director: 'Sergio Leone', - actors: 'Robert De Niro, James Woods, Elizabeth McGovern, Joe Pesci', - plot: 'A former Prohibition-era Jewish gangster returns to the Lower East Side of Manhattan over thirty years later, where he once again must confront the ghosts and regrets of his old life.', - posterUrl: + }, + { + id: 88, + title: 'Once Upon a Time in America', + year: '1984', + runtime: '229', + genres: ['Crime', 'Drama'], + director: 'Sergio Leone', + actors: 'Robert De Niro, James Woods, Elizabeth McGovern, Joe Pesci', + plot: 'A former Prohibition-era Jewish gangster returns to the Lower East Side of Manhattan over thirty years later, where he once again must confront the ghosts and regrets of his old life.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMGFkNWI4MTMtNGQ0OC00MWVmLTk3MTktOGYxN2Y2YWVkZWE2XkEyXkFqcGdeQXVyNjU0OTQ0OTY@._V1_SX300.jpg', - }, - { - id: 89, - title: 'Oblivion', - year: '2013', - runtime: '124', - genres: ['Action', 'Adventure', 'Mystery'], - director: 'Joseph Kosinski', - actors: 'Tom Cruise, Morgan Freeman, Olga Kurylenko, Andrea Riseborough', - plot: "A veteran assigned to extract Earth's remaining resources begins to question what he knows about his mission and himself.", - posterUrl: + }, + { + id: 89, + title: 'Oblivion', + year: '2013', + runtime: '124', + genres: ['Action', 'Adventure', 'Mystery'], + director: 'Joseph Kosinski', + actors: 'Tom Cruise, Morgan Freeman, Olga Kurylenko, Andrea Riseborough', + plot: "A veteran assigned to extract Earth's remaining resources begins to question what he knows about his mission and himself.", + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTQwMDY0MTA4MF5BMl5BanBnXkFtZTcwNzI3MDgxOQ@@._V1_SX300.jpg', - }, - { - id: 90, - title: 'V for Vendetta', - year: '2005', - runtime: '132', - genres: ['Action', 'Drama', 'Thriller'], - director: 'James McTeigue', - actors: 'Natalie Portman, Hugo Weaving, Stephen Rea, Stephen Fry', - plot: 'In a future British tyranny, a shadowy freedom fighter, known only by the alias of "V", plots to overthrow it with the help of a young woman.', - posterUrl: + }, + { + id: 90, + title: 'V for Vendetta', + year: '2005', + runtime: '132', + genres: ['Action', 'Drama', 'Thriller'], + director: 'James McTeigue', + actors: 'Natalie Portman, Hugo Weaving, Stephen Rea, Stephen Fry', + plot: 'In a future British tyranny, a shadowy freedom fighter, known only by the alias of "V", plots to overthrow it with the help of a young woman.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BOTI5ODc3NzExNV5BMl5BanBnXkFtZTcwNzYxNzQzMw@@._V1_SX300.jpg', - }, - { - id: 91, - title: 'Gattaca', - year: '1997', - runtime: '106', - genres: ['Drama', 'Sci-Fi', 'Thriller'], - director: 'Andrew Niccol', - actors: 'Ethan Hawke, Uma Thurman, Gore Vidal, Xander Berkeley', - plot: 'A genetically inferior man assumes the identity of a superior one in order to pursue his lifelong dream of space travel.', - posterUrl: + }, + { + id: 91, + title: 'Gattaca', + year: '1997', + runtime: '106', + genres: ['Drama', 'Sci-Fi', 'Thriller'], + director: 'Andrew Niccol', + actors: 'Ethan Hawke, Uma Thurman, Gore Vidal, Xander Berkeley', + plot: 'A genetically inferior man assumes the identity of a superior one in order to pursue his lifelong dream of space travel.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BNDQxOTc0MzMtZmRlOS00OWQ5LWI2ZDctOTAwNmMwOTYxYzlhXkEyXkFqcGdeQXVyMTQxNzMzNDI@._V1_SX300.jpg', - }, - { - id: 92, - title: 'Silver Linings Playbook', - year: '2012', - runtime: '122', - genres: ['Comedy', 'Drama', 'Romance'], - director: 'David O. Russell', - actors: 'Bradley Cooper, Jennifer Lawrence, Robert De Niro, Jacki Weaver', - plot: 'After a stint in a mental institution, former teacher Pat Solitano moves back in with his parents and tries to reconcile with his ex-wife. Things get more challenging when Pat meets Tiffany, a mysterious girl with problems of her own.', - posterUrl: + }, + { + id: 92, + title: 'Silver Linings Playbook', + year: '2012', + runtime: '122', + genres: ['Comedy', 'Drama', 'Romance'], + director: 'David O. Russell', + actors: 'Bradley Cooper, Jennifer Lawrence, Robert De Niro, Jacki Weaver', + plot: 'After a stint in a mental institution, former teacher Pat Solitano moves back in with his parents and tries to reconcile with his ex-wife. Things get more challenging when Pat meets Tiffany, a mysterious girl with problems of her own.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTM2MTI5NzA3MF5BMl5BanBnXkFtZTcwODExNTc0OA@@._V1_SX300.jpg', - }, - { - id: 93, - title: 'Alice in Wonderland', - year: '2010', - runtime: '108', - genres: ['Adventure', 'Family', 'Fantasy'], - director: 'Tim Burton', - actors: 'Johnny Depp, Mia Wasikowska, Helena Bonham Carter, Anne Hathaway', - plot: "Nineteen-year-old Alice returns to the magical world from her childhood adventure, where she reunites with her old friends and learns of her true destiny: to end the Red Queen's reign of terror.", - posterUrl: + }, + { + id: 93, + title: 'Alice in Wonderland', + year: '2010', + runtime: '108', + genres: ['Adventure', 'Family', 'Fantasy'], + director: 'Tim Burton', + actors: 'Johnny Depp, Mia Wasikowska, Helena Bonham Carter, Anne Hathaway', + plot: "Nineteen-year-old Alice returns to the magical world from her childhood adventure, where she reunites with her old friends and learns of her true destiny: to end the Red Queen's reign of terror.", + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTMwNjAxMTc0Nl5BMl5BanBnXkFtZTcwODc3ODk5Mg@@._V1_SX300.jpg', - }, - { - id: 94, - title: 'Gandhi', - year: '1982', - runtime: '191', - genres: ['Biography', 'Drama'], - director: 'Richard Attenborough', - actors: 'Ben Kingsley, Candice Bergen, Edward Fox, John Gielgud', - plot: "Gandhi's character is fully explained as a man of nonviolence. Through his patience, he is able to drive the British out of the subcontinent. And the stubborn nature of Jinnah and his commitment towards Pakistan is portrayed.", - posterUrl: + }, + { + id: 94, + title: 'Gandhi', + year: '1982', + runtime: '191', + genres: ['Biography', 'Drama'], + director: 'Richard Attenborough', + actors: 'Ben Kingsley, Candice Bergen, Edward Fox, John Gielgud', + plot: "Gandhi's character is fully explained as a man of nonviolence. Through his patience, he is able to drive the British out of the subcontinent. And the stubborn nature of Jinnah and his commitment towards Pakistan is portrayed.", + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMzJiZDRmOWUtYjE2MS00Mjc1LTg1ZDYtNTQxYWJkZTg1OTM4XkEyXkFqcGdeQXVyNjUwNzk3NDc@._V1_SX300.jpg', - }, - { - id: 95, - title: 'Pacific Rim', - year: '2013', - runtime: '131', - genres: ['Action', 'Adventure', 'Sci-Fi'], - director: 'Guillermo del Toro', - actors: 'Charlie Hunnam, Diego Klattenhoff, Idris Elba, Rinko Kikuchi', - plot: 'As a war between humankind and monstrous sea creatures wages on, a former pilot and a trainee are paired up to drive a seemingly obsolete special weapon in a desperate effort to save the world from the apocalypse.', - posterUrl: + }, + { + id: 95, + title: 'Pacific Rim', + year: '2013', + runtime: '131', + genres: ['Action', 'Adventure', 'Sci-Fi'], + director: 'Guillermo del Toro', + actors: 'Charlie Hunnam, Diego Klattenhoff, Idris Elba, Rinko Kikuchi', + plot: 'As a war between humankind and monstrous sea creatures wages on, a former pilot and a trainee are paired up to drive a seemingly obsolete special weapon in a desperate effort to save the world from the apocalypse.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTY3MTI5NjQ4Nl5BMl5BanBnXkFtZTcwOTU1OTU0OQ@@._V1_SX300.jpg', - }, - { - id: 96, - title: 'Kiss Kiss Bang Bang', - year: '2005', - runtime: '103', - genres: ['Comedy', 'Crime', 'Mystery'], - director: 'Shane Black', - actors: 'Robert Downey Jr., Val Kilmer, Michelle Monaghan, Corbin Bernsen', - plot: 'A murder mystery brings together a private eye, a struggling actress, and a thief masquerading as an actor.', - posterUrl: + }, + { + id: 96, + title: 'Kiss Kiss Bang Bang', + year: '2005', + runtime: '103', + genres: ['Comedy', 'Crime', 'Mystery'], + director: 'Shane Black', + actors: 'Robert Downey Jr., Val Kilmer, Michelle Monaghan, Corbin Bernsen', + plot: 'A murder mystery brings together a private eye, a struggling actress, and a thief masquerading as an actor.', + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMTY5NDExMDA3M15BMl5BanBnXkFtZTYwNTc2MzA3._V1_SX300.jpg', - }, - { - id: 97, - title: 'The Quiet American', - year: '2002', - runtime: '101', - genres: ['Drama', 'Mystery', 'Romance'], - director: 'Phillip Noyce', - actors: 'Michael Caine, Brendan Fraser, Do Thi Hai Yen, Rade Serbedzija', - plot: 'An older British reporter vies with a young U.S. doctor for the affections of a beautiful Vietnamese woman.', - posterUrl: + }, + { + id: 97, + title: 'The Quiet American', + year: '2002', + runtime: '101', + genres: ['Drama', 'Mystery', 'Romance'], + director: 'Phillip Noyce', + actors: 'Michael Caine, Brendan Fraser, Do Thi Hai Yen, Rade Serbedzija', + plot: 'An older British reporter vies with a young U.S. doctor for the affections of a beautiful Vietnamese woman.', + posterUrl: 'http://ia.media-imdb.com/images/M/MV5BMjE2NTUxNTE3Nl5BMl5BanBnXkFtZTYwNTczMTg5._V1_SX300.jpg', - }, - { - id: 98, - title: 'Cloud Atlas', - year: '2012', - runtime: '172', - genres: ['Drama', 'Sci-Fi'], - director: 'Tom Tykwer, Lana Wachowski, Lilly Wachowski', - actors: 'Tom Hanks, Halle Berry, Jim Broadbent, Hugo Weaving', - plot: 'An exploration of how the actions of individual lives impact one another in the past, present and future, as one soul is shaped from a killer into a hero, and an act of kindness ripples across centuries to inspire a revolution.', - posterUrl: + }, + { + id: 98, + title: 'Cloud Atlas', + year: '2012', + runtime: '172', + genres: ['Drama', 'Sci-Fi'], + director: 'Tom Tykwer, Lana Wachowski, Lilly Wachowski', + actors: 'Tom Hanks, Halle Berry, Jim Broadbent, Hugo Weaving', + plot: 'An exploration of how the actions of individual lives impact one another in the past, present and future, as one soul is shaped from a killer into a hero, and an act of kindness ripples across centuries to inspire a revolution.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMTczMTgxMjc4NF5BMl5BanBnXkFtZTcwNjM5MTA2OA@@._V1_SX300.jpg', - }, - { - id: 99, - title: 'The Impossible', - year: '2012', - runtime: '114', - genres: ['Drama', 'Thriller'], - director: 'J.A. Bayona', - actors: 'Naomi Watts, Ewan McGregor, Tom Holland, Samuel Joslin', - plot: 'The story of a tourist family in Thailand caught in the destruction and chaotic aftermath of the 2004 Indian Ocean tsunami.', - posterUrl: + }, + { + id: 99, + title: 'The Impossible', + year: '2012', + runtime: '114', + genres: ['Drama', 'Thriller'], + director: 'J.A. Bayona', + actors: 'Naomi Watts, Ewan McGregor, Tom Holland, Samuel Joslin', + plot: 'The story of a tourist family in Thailand caught in the destruction and chaotic aftermath of the 2004 Indian Ocean tsunami.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjA5NTA3NzQ5Nl5BMl5BanBnXkFtZTcwOTYxNjY0OA@@._V1_SX300.jpg', - }, - { - id: 100, - title: 'All Quiet on the Western Front', - year: '1930', - runtime: '136', - genres: ['Drama', 'War'], - director: 'Lewis Milestone', - actors: 'Louis Wolheim, Lew Ayres, John Wray, Arnold Lucy', - plot: 'A young soldier faces profound disillusionment in the soul-destroying horror of World War I.', - posterUrl: + }, + { + id: 100, + title: 'All Quiet on the Western Front', + year: '1930', + runtime: '136', + genres: ['Drama', 'War'], + director: 'Lewis Milestone', + actors: 'Louis Wolheim, Lew Ayres, John Wray, Arnold Lucy', + plot: 'A young soldier faces profound disillusionment in the soul-destroying horror of World War I.', + posterUrl: 'https://images-na.ssl-images-amazon.com/images/M/MV5BNTM5OTg2NDY1NF5BMl5BanBnXkFtZTcwNTQ4MTMwNw@@._V1_SX300.jpg', - }, - ], + }, + ], }; export default popularMovies; diff --git a/src/HOC/HocComponent.js b/src/HOC/HocComponent.js index 8cfaf2a..87c210f 100644 --- a/src/HOC/HocComponent.js +++ b/src/HOC/HocComponent.js @@ -1,42 +1,39 @@ +// imported Packages import React, { useEffect } from 'react'; import { useDispatch, useSelector } from 'react-redux'; -// imported Packages -import { getMoviesFunc } from '../Actions'; // imported action from reducer +import getMoviesFunc from '../Store/Actions/index'; /** - * creating High Order component to render diffrent component using HOC + * A High Order component to render diffrent component using HOC * @param {Node} WrappedComponent * @returns Component */ const HocComponent = (WrappedComponent) => { - /** - * return new Component - */ - return function HocMovies() { - // use useSelector ook to get the state value - const movieData = useSelector((state) => state.movieReducer.value); + // eslint-disable-next-line no-unused-vars + const HocMovies = () => { + // use useSelector hook to get the state value + const movieData = useSelector((state) => state.movieReducer.value); - // creating dispatch variabe of useDispatch hook - const dispatch = useDispatch(); - useEffect(() => { - // dispatching a Action - actionDispatch(); - // dispatch(getMoviesFunc()); - }, [movieData]); - /** - * A function use to dispatch action after 5 sec - */ - const actionDispatch = async () => { - dispatch(getMoviesFunc()); - }; - return ( -
- -
- ); + // creating dispatch constant + const dispatch = useDispatch(); + const actionDispatch = () => { + dispatch(getMoviesFunc()); }; + useEffect(() => { + // dispatching a Action + actionDispatch(); + // dispatch(getMoviesFunc()); + }, []); + /** + * A function use to dispatch action + */ + return ( +
+ +
+ ); + }; }; - export default HocComponent; diff --git a/src/Masseges/index.js b/src/Masseges/index.js index f2212e6..fa16bb3 100644 --- a/src/Masseges/index.js +++ b/src/Masseges/index.js @@ -1,2 +1,3 @@ // Massage if user Fail to login -export const loginFailMsg = 'Username and Password is Wrong'; +const loginFailMsg = 'Username and Password is Wrong'; +export default loginFailMsg; diff --git a/src/Reducers/movieReducer.js b/src/Reducers/movieReducer.js deleted file mode 100644 index f6081aa..0000000 --- a/src/Reducers/movieReducer.js +++ /dev/null @@ -1,26 +0,0 @@ -import { getMovieData } from '../Actions'; -// imported Actions - -// Creating Initial Value for Reducer -const initialState = { - value: { movies: [] }, -}; - -/** - * A Reducer to get the movies - * @param {object} state - * @param {function} action - * @returns - */ -const movieReducer = (state = initialState, action) => { - // Handling Action using Switch - switch (action.type) { - case getMovieData: - return { - value: action.payload, - }; - default: - return state; - } -}; -export default movieReducer; diff --git a/src/Routing/RouteVars.js b/src/Routing/RouteConstants.js similarity index 79% rename from src/Routing/RouteVars.js rename to src/Routing/RouteConstants.js index 56b3e2f..eb3b4da 100644 --- a/src/Routing/RouteVars.js +++ b/src/Routing/RouteConstants.js @@ -1,4 +1,4 @@ +// A constants for Routes export const secureRoute = '/'; export const loginRoute = '/login'; export const dashboardRoute = '/dashboard'; -// creating routes Variables diff --git a/src/Routing/index.js b/src/Routing/index.js index 63ec6bc..20a770e 100644 --- a/src/Routing/index.js +++ b/src/Routing/index.js @@ -1,30 +1,32 @@ +// imported Packages import React from 'react'; import { Routes, Route } from 'react-router-dom'; -// imported Packages -import { loginRoute, dashboardRoute, secureRoute } from './RouteVars'; -// imported Route Variables +// imported Route constant +import { loginRoute, dashboardRoute, secureRoute } from './RouteConstants'; +// imported Required Components import Login from '../AppView/Login/Login'; import Main from '../AppView/Dashboard/Main'; import Auth from '../Authrization'; -// imported Requred Components -const Routing = () => { - return ( - <> - {/* Creating Routes for the App */} - - {/* login Route */} - } /> +/** + * Routing use to Navigate to the different Pages + */ - } /> +const Routing = () => ( + <> + {/* Creating Routes for the App */} + + {/* login Route */} + } /> - {/* dashboard Route */} - } /> - - - ); -}; + {/* Authrization Route */} + } /> + {/* dashboard Route */} + } /> + + +); export default Routing; diff --git a/src/Store/Actions/index.js b/src/Store/Actions/index.js new file mode 100644 index 0000000..01afc8d --- /dev/null +++ b/src/Store/Actions/index.js @@ -0,0 +1,13 @@ +// imported FakeApi Data +import popularMovies from '../../FakeApi/PopularMovie'; + +// A constant for action +export const getMovieData = 'GETMOVIES'; + +// Creating A Variable for Action +const getMoviesFunc = () => ({ + type: getMovieData, + payload: popularMovies, +}); + +export default getMoviesFunc; diff --git a/src/Store/Reducers/MovieReducer/index.js b/src/Store/Reducers/MovieReducer/index.js new file mode 100644 index 0000000..f42f6ac --- /dev/null +++ b/src/Store/Reducers/MovieReducer/index.js @@ -0,0 +1,30 @@ +// imported Actions +import { getMovieData } from '../../Actions'; + +// Creating Initial Value for Reducer +const initialState = { + value: { + movies: [], + }, +}; + +/** + * A MovieReducer to get the movies + * @param {object} state A initial state of the reducer + * @param {function} action A type of action + * @returns + */ + +const movieReducer = (state = initialState, action = {}) => { + // Handling Action using Switch + switch (action.type) { + case getMovieData: + return { + ...state, + value: action.payload, + }; + default: + return state; + } +}; +export default movieReducer; diff --git a/src/Reducers/combineReducer.js b/src/Store/Reducers/index.js similarity index 77% rename from src/Reducers/combineReducer.js rename to src/Store/Reducers/index.js index 44bc293..beeefa1 100644 --- a/src/Reducers/combineReducer.js +++ b/src/Store/Reducers/index.js @@ -1,14 +1,14 @@ -import movieReducer from './movieReducer'; -// importing created Reducer - -import { combineReducers } from 'redux'; // importing Package +import { combineReducers } from 'redux'; + +// importing created Reducer +import movieReducer from './MovieReducer'; /** * Use to Combine Multiple Reducers */ const combineReducer = combineReducers({ - movieReducer, + movieReducer, }); export default combineReducer; diff --git a/src/Store/Store.js b/src/Store/Store.js deleted file mode 100644 index 5e2768a..0000000 --- a/src/Store/Store.js +++ /dev/null @@ -1,12 +0,0 @@ -import { configureStore } from '@reduxjs/toolkit'; -// imported Packages - -import combineReducer from '../Reducers/combineReducer'; -// imported Reducer for store - -/** - * ceating and exporing a store - */ -export const Store = configureStore({ - reducer: combineReducer, -}); diff --git a/src/Store/index.js b/src/Store/index.js new file mode 100644 index 0000000..c19b4c6 --- /dev/null +++ b/src/Store/index.js @@ -0,0 +1,14 @@ +// imported Package +import { configureStore } from '@reduxjs/toolkit'; + +// imported Reducer for store +import combineReducer from './Reducers'; + +/** + * A Store to Hold the State of the App + */ +const Store = configureStore({ + reducer: combineReducer, +}); + +export default Store; diff --git a/src/index.js b/src/index.js index cf57d11..a282b2c 100644 --- a/src/index.js +++ b/src/index.js @@ -1,12 +1,15 @@ +// imported packages import React from 'react'; +import { BrowserRouter as Router } from 'react-router-dom'; import ReactDOM from 'react-dom/client'; -import './index.css'; -import App from './App'; -import reportWebVitals from './reportWebVitals'; -import {BrowserRouter as Router } from 'react-router-dom'; import { Provider } from 'react-redux'; -import { Store } from './Store/Store'; +// imported Components +import App from './App'; +import Store from './Store'; + +// imported css file +import './index.css'; const root = ReactDOM.createRoot(document.getElementById('root')); root.render( @@ -16,11 +19,9 @@ root.render( - - + , ); // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log)) // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); diff --git a/src/logo.svg b/src/logo.svg deleted file mode 100644 index 9dfc1c0..0000000 --- a/src/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/reportWebVitals.js b/src/reportWebVitals.js deleted file mode 100644 index 5253d3a..0000000 --- a/src/reportWebVitals.js +++ /dev/null @@ -1,13 +0,0 @@ -const reportWebVitals = onPerfEntry => { - if (onPerfEntry && onPerfEntry instanceof Function) { - import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); - getFID(onPerfEntry); - getFCP(onPerfEntry); - getLCP(onPerfEntry); - getTTFB(onPerfEntry); - }); - } -}; - -export default reportWebVitals; diff --git a/src/setupTests.js b/src/setupTests.js deleted file mode 100644 index 8f2609b..0000000 --- a/src/setupTests.js +++ /dev/null @@ -1,5 +0,0 @@ -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom'; diff --git a/yarn.lock b/yarn.lock index d1351b9..cc78df4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3999,6 +3999,11 @@ "is-date-object" "^1.0.1" "is-symbol" "^1.0.2" +"es6-object-assign@^1.1.0": + "integrity" "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==" + "resolved" "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz" + "version" "1.1.0" + "escalade@^3.1.1": "integrity" "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" "resolved" "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" @@ -4104,7 +4109,7 @@ "lodash" "^4.17.21" "string-natural-compare" "^3.0.1" -"eslint-plugin-import@^2.25.2", "eslint-plugin-import@^2.25.3", "eslint-plugin-import@^2.26.0": +"eslint-plugin-import@^2.25.2", "eslint-plugin-import@^2.25.3": "integrity" "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==" "resolved" "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz" "version" "2.26.0" @@ -4130,7 +4135,7 @@ dependencies: "@typescript-eslint/experimental-utils" "^5.0.0" -"eslint-plugin-jsx-a11y@^6.5.1", "eslint-plugin-jsx-a11y@^6.6.1": +"eslint-plugin-jsx-a11y@^6.5.1": "integrity" "sha512-sXgFVNHiWffBq23uiS/JaP6eVR622DqwB4yTzKvGZGcPq6/yZ3WmOZfuBks/vHWo9GaFOqC2ZK4i6+C35knx7Q==" "resolved" "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.6.1.tgz" "version" "6.6.1" @@ -4156,12 +4161,12 @@ dependencies: "prettier-linter-helpers" "^1.0.0" -"eslint-plugin-react-hooks@^4.3.0", "eslint-plugin-react-hooks@^4.6.0": +"eslint-plugin-react-hooks@^4.3.0": "integrity" "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==" "resolved" "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz" "version" "4.6.0" -"eslint-plugin-react@^7.27.1", "eslint-plugin-react@^7.28.0", "eslint-plugin-react@^7.30.1": +"eslint-plugin-react@^7.27.1", "eslint-plugin-react@^7.28.0": "integrity" "sha512-NbEvI9jtqO46yJA3wcRF9Mo0lF9T/jhdHqhCHXiXtD+Zcb98812wvokjWpU7Q4QH5edo6dmqrukxVvWWXHlsUg==" "resolved" "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.30.1.tgz" "version" "7.30.1" @@ -4245,7 +4250,7 @@ "normalize-path" "^3.0.0" "schema-utils" "^4.0.0" -"eslint@*", "eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8", "eslint@^3 || ^4 || ^5 || ^6 || ^7 || ^8", "eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0", "eslint@^6.0.0 || ^7.0.0 || ^8.0.0", "eslint@^7.0.0 || ^8.0.0", "eslint@^7.32.0 || ^8.2.0", "eslint@^7.5.0 || ^8.0.0", "eslint@^8.0.0", "eslint@^8.1.0", "eslint@^8.20.0", "eslint@^8.3.0", "eslint@>= 6", "eslint@>=5", "eslint@>=7.0.0", "eslint@>=7.28.0": +"eslint@*", "eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8", "eslint@^3 || ^4 || ^5 || ^6 || ^7 || ^8", "eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0", "eslint@^6.0.0 || ^7.0.0 || ^8.0.0", "eslint@^7.0.0 || ^8.0.0", "eslint@^7.32.0 || ^8.2.0", "eslint@^7.5.0 || ^8.0.0", "eslint@^8.0.0", "eslint@^8.1.0", "eslint@^8.3.0", "eslint@>= 6", "eslint@>=5", "eslint@>=7.0.0", "eslint@>=7.28.0": "integrity" "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==" "resolved" "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz" "version" "8.20.0" @@ -7365,6 +7370,11 @@ "resolved" "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" "version" "2.0.1" +"promise-polyfill@^6.0.2": + "integrity" "sha512-g0LWaH0gFsxovsU7R5LrrhHhWAWiHRnh1GPrhXnPgYsDkIqjRYUYSZEsej/wtleDrz5xVSIDbeKfidztp2XHFQ==" + "resolved" "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-6.1.0.tgz" + "version" "6.1.0" + "promise@^8.1.0": "integrity" "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==" "resolved" "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz" @@ -8550,6 +8560,14 @@ "picocolors" "^1.0.0" "stable" "^0.1.8" +"sweetalert@^2.1.2": + "integrity" "sha512-iWx7X4anRBNDa/a+AdTmvAzQtkN1+s4j/JJRWlHpYE8Qimkohs8/XnFcWeYHH2lMA8LRCa5tj2d244If3S/hzA==" + "resolved" "https://registry.npmjs.org/sweetalert/-/sweetalert-2.1.2.tgz" + "version" "2.1.2" + dependencies: + "es6-object-assign" "^1.1.0" + "promise-polyfill" "^6.0.2" + "symbol-tree@^3.2.4": "integrity" "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" "resolved" "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz"