├── .babelrc ├── .eslintrc.json ├── .github └── workflows │ └── linters.yml ├── .gitignore ├── .stylelintrc.json ├── LICENSE ├── README.md ├── Screenshot_1.png ├── Screenshot_2.png ├── assetsTransformer.js ├── package-lock.json ├── package.json ├── public └── index.html ├── setupJest.js └── src ├── App.js ├── __test__ ├── Country.test.js └── __snapshots__ │ └── Country.test.js.snap ├── components ├── Country.js ├── Details.js ├── Filter.js ├── Header.js └── Home.js ├── img └── Corona.png ├── index.css ├── index.js ├── redux ├── configureStore.js └── virus │ └── virusInformation.js └── setupTests.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-react", "@babel/preset-env"], 3 | "plugins": ["@babel/plugin-syntax-jsx"], 4 | "env": { 5 | "test": { 6 | "plugins": ["@babel/plugin-transform-runtime"] 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es6": true, 5 | "jest": true 6 | }, 7 | "parser": "@babel/eslint-parser", 8 | "parserOptions": { 9 | "ecmaFeatures": { 10 | "jsx": true 11 | }, 12 | "ecmaVersion": 2018, 13 | "sourceType": "module" 14 | }, 15 | "extends": ["airbnb", "plugin:react/recommended"], 16 | "plugins": ["react"], 17 | "rules": { 18 | "react/jsx-filename-extension": ["warn", { "extensions": [".js", ".jsx"] }], 19 | "react/react-in-jsx-scope": "off", 20 | "import/no-unresolved": "off", 21 | "no-shadow": "off" 22 | }, 23 | "ignorePatterns": [ 24 | "dist/", 25 | "build/" 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /.github/workflows/linters.yml: -------------------------------------------------------------------------------- 1 | name: Linters 2 | 3 | on: pull_request 4 | 5 | env: 6 | FORCE_COLOR: 1 7 | 8 | jobs: 9 | eslint: 10 | name: ESLint 11 | runs-on: ubuntu-18.04 12 | steps: 13 | - uses: actions/checkout@v2 14 | - uses: actions/setup-node@v1 15 | with: 16 | node-version: "12.x" 17 | - name: Setup ESLint 18 | run: | 19 | npm install --save-dev eslint@7.x eslint-config-airbnb@18.x eslint-plugin-import@2.x eslint-plugin-jsx-a11y@6.x eslint-plugin-react@7.x eslint-plugin-react-hooks@4.x @babel/eslint-parser@7.x @babel/core@7.x @babel/plugin-syntax-jsx@7.x @babel/preset-react@7.x 20 | [ -f .eslintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/react-redux/.eslintrc.json 21 | [ -f .babelrc ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/react-redux/.babelrc 22 | - name: ESLint Report 23 | run: npx eslint . 24 | stylelint: 25 | name: Stylelint 26 | runs-on: ubuntu-18.04 27 | steps: 28 | - uses: actions/checkout@v2 29 | - uses: actions/setup-node@v1 30 | with: 31 | node-version: "12.x" 32 | - name: Setup Stylelint 33 | run: | 34 | npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x 35 | [ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/react-redux/.stylelintrc.json 36 | - name: Stylelint Report 37 | run: npx stylelint "**/*.{css,scss}" 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 106 | 107 | # dependencies 108 | /node_modules 109 | /.pnp 110 | .pnp.js 111 | 112 | # testing 113 | /coverage 114 | 115 | # production 116 | /build 117 | 118 | # misc 119 | .DS_Store 120 | .env.local 121 | .env.development.local 122 | .env.test.local 123 | .env.production.local 124 | 125 | npm-debug.log* 126 | yarn-debug.log* 127 | yarn-error.log* 128 | -------------------------------------------------------------------------------- /.stylelintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["stylelint-config-standard"], 3 | "plugins": ["stylelint-scss", "stylelint-csstree-validator"], 4 | "rules": { 5 | "at-rule-no-unknown": null, 6 | "scss/at-rule-no-unknown": true, 7 | "csstree/validator": true 8 | }, 9 | "ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css", "**/*.js", "**/*.jsx"] 10 | } 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Laylo Khodjaeva 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Covid-19 data traker 2 | 3 | > SPA web app which is created using React and Redux. This webapp helps to get new information about Covid-19. 4 | 5 |  6 |  7 | 8 | ## Built With 9 | 10 | - Javascript 11 | - React 12 | - Redux 13 | - CSS 14 | 15 | ## Live Demo 16 | 17 | [NETLIFY](https://covid19-tracker-laylo309.netlify.app/#/home) 18 | 19 | ## Live video presentation 20 | [Loom](https://www.loom.com/share/c85a279634ed4a0faea9f51943ba125e) 21 | 22 | ## Getting Started 23 | 24 | **This is an example of how you may give instructions on setting up your project locally.** 25 | **Modify this file to match your project, remove sections that don't apply. For example: delete the testing section if the currect project doesn't require testing.** 26 | 27 | 28 | To get a local copy up and running follow these simple example steps. 29 | 30 | 31 | ## Setup 32 | 33 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 34 | 35 | ### Available Scripts 36 | 37 | In the project directory, you can run: 38 | 39 | #### `npm start` 40 | 41 | Runs the app in the development mode.\ 42 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 43 | 44 | The page will reload if you make edits.\ 45 | You will also see any lint errors in the console. 46 | 47 | #### `npm test` 48 | 49 | Launches the test runner in the interactive watch mode.\ 50 | 51 | #### `npm run build` 52 | 53 | Builds the app for production to the `build` folder.\ 54 | It correctly bundles React in production mode and optimizes the build for the best performance. 55 | 56 | The build is minified and the filenames include the hashes.\ 57 | App is ready to be deployed! 58 | ## Author 59 | 60 | 👤 **Laylo Khodjaeva** 61 | 62 | - GitHub: [@Laylo309](https://github.com/Laylo309) 63 | - Twitter: [@Laylo](https://twitter.com/home?lang=en) 64 | - LinkedIn: [LayloKhodjaeva](https://www.linkedin.com/in/laylo-khodjaeva-05a972207/) 65 | 66 | ## 🤝 Contributing 67 | 68 | Contributions, issues, and feature requests are welcome! 69 | 70 | Feel free to check the [issues page](../../issues/). 71 | 72 | ## Show your support 73 | 74 | Give a ⭐️ if you like this project! 75 | ## 📝 License 76 | 77 | This project is [MIT](./MIT.md) licensed. 78 | **Original design idea by Nelson Sakwa on Behance.** 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Screenshot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Laylo309/react_capstone/7add4831e7f745b06b32ac07db27838dff19a06d/Screenshot_1.png -------------------------------------------------------------------------------- /Screenshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Laylo309/react_capstone/7add4831e7f745b06b32ac07db27838dff19a06d/Screenshot_2.png -------------------------------------------------------------------------------- /assetsTransformer.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | process(filename) { 5 | return `module.exports = ${JSON.stringify(path.basename(filename))};`; 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react_capstone", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@popperjs/core": "^2.10.2", 7 | "@testing-library/jest-dom": "^5.14.1", 8 | "@testing-library/react": "^11.2.7", 9 | "@testing-library/user-event": "^12.8.3", 10 | "axios": "^0.21.1", 11 | "bootstrap": "^5.1.3", 12 | "jest-fetch-mock": "^3.0.3", 13 | "node-sass": "^6.0.1", 14 | "popper.js": "^1.16.1", 15 | "prop-types": "^15.7.2", 16 | "react": "^17.0.2", 17 | "react-dom": "^17.0.2", 18 | "react-icons": "^4.2.0", 19 | "react-image": "^4.0.3", 20 | "react-redux": "^7.2.4", 21 | "react-router-bootstrap": "^0.25.0", 22 | "react-router-dom": "^5.2.0", 23 | "react-scripts": "4.0.3", 24 | "react-test-renderer": "^17.0.2", 25 | "redux": "^4.1.1", 26 | "redux-logger": "^3.0.6", 27 | "redux-thunk": "^2.3.0", 28 | "regenerator-runtime": "^0.13.9", 29 | "uuid": "^8.3.2", 30 | "web-vitals": "^1.1.2" 31 | }, 32 | "scripts": { 33 | "start": "react-scripts start", 34 | "build": "react-scripts build", 35 | "test": "jest", 36 | "test:watch": "npm test -- --watch", 37 | "eject": "react-scripts eject", 38 | "predeploy": "npm run build", 39 | "deploy": "gh-pages -d build" 40 | }, 41 | "eslintConfig": { 42 | "extends": [ 43 | "react-app", 44 | "react-app/jest" 45 | ] 46 | }, 47 | "browserslist": { 48 | "production": [ 49 | ">0.2%", 50 | "not dead", 51 | "not op_mini all" 52 | ], 53 | "development": [ 54 | "last 1 chrome version", 55 | "last 1 firefox version", 56 | "last 1 safari version" 57 | ] 58 | }, 59 | "devDependencies": { 60 | "@babel/core": "^7.15.0", 61 | "@babel/eslint-parser": "^7.15.0", 62 | "@babel/plugin-syntax-jsx": "^7.14.5", 63 | "@babel/plugin-transform-runtime": "^7.12.1", 64 | "@babel/preset-env": "^7.15.0", 65 | "@babel/preset-react": "^7.14.5", 66 | "babel-jest": "^26.6.3", 67 | "eslint": "^7.32.0", 68 | "eslint-config-airbnb": "^18.2.1", 69 | "eslint-plugin-import": "^2.24.0", 70 | "eslint-plugin-jsx-a11y": "^6.4.1", 71 | "eslint-plugin-react": "^7.24.0", 72 | "eslint-plugin-react-hooks": "^4.2.0", 73 | "gh-pages": "^3.2.3", 74 | "jest": "^26.6.0", 75 | "jest-dom": "^4.0.0", 76 | "msw": "^0.35.0", 77 | "riteway": "^6.3.1", 78 | "stylelint": "^13.13.1", 79 | "stylelint-config-standard": "^21.0.0", 80 | "stylelint-csstree-validator": "^1.9.0", 81 | "stylelint-scss": "^3.20.1" 82 | }, 83 | "jest": { 84 | "automock": false, 85 | "resetMocks": false, 86 | "setupFiles": [ 87 | "./setupJest.js" 88 | ] 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 11 |
28 | Infections:
29 | {' '}
30 | {
31 | Number(country.today_confirmed).toLocaleString()
32 | }
33 |
15 | Infections: 16 | {' '} 17 | {country ? Number(country.today_confirmed).toLocaleString() : '0'} 18 |
19 |20 | Deaths: 21 | {' '} 22 | {country ? Number(country.today_deaths).toLocaleString() : '0'} 23 |
24 |28 | New confirm: 29 | {' '} 30 | { country.today_new_confirmed } 31 |
32 |35 | New deaths: 36 | {' '} 37 | { country.today_new_deaths } 38 |
39 |42 | New recovered: 43 | {' '} 44 | { country.today_new_recovered } 45 |
46 |49 | Open Cases: 50 | {' '} 51 | { country.today_open_cases } 52 |
53 |56 | New Open Cases: 57 | {' '} 58 | { country.today_new_open_cases } 59 |
60 |63 | Source: 64 | {' '} 65 | { country.source } 66 |
67 |18 | Infections: 19 | {' '} 20 | {Number(useSelector((state) => state.totalConfirmed)).toLocaleString()} 21 |
22 |