From 530ba33bbcb2775e8dfd368f254b0f195c84a516 Mon Sep 17 00:00:00 2001 From: BALaka-18 Date: Fri, 21 Aug 2020 12:20:14 +0530 Subject: [PATCH 01/12] gitignore sample --- .gitignore | 138 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a81c8ee --- /dev/null +++ b/.gitignore @@ -0,0 +1,138 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ From 910167c0cf5fa8f4626f2f4fb99eba8859f92db0 Mon Sep 17 00:00:00 2001 From: BALaka-18 Date: Fri, 21 Aug 2020 12:32:33 +0530 Subject: [PATCH 02/12] gitignore sample deleted --- .gitignore | 138 ----------------------------------------------------- 1 file changed, 138 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index a81c8ee..0000000 --- a/.gitignore +++ /dev/null @@ -1,138 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ From e021db3c0248cacab4646415087a52c644a954af Mon Sep 17 00:00:00 2001 From: Amber-Williams Date: Mon, 24 Aug 2020 18:12:00 +0100 Subject: [PATCH 03/12] Add package: react-router-dom --- malarial-detection/package.json | 1 + malarial-detection/yarn.lock | 94 +++++++++++++++++++++++++++++++-- 2 files changed, 92 insertions(+), 3 deletions(-) diff --git a/malarial-detection/package.json b/malarial-detection/package.json index 2ae61ee..d025b05 100644 --- a/malarial-detection/package.json +++ b/malarial-detection/package.json @@ -8,6 +8,7 @@ "@testing-library/user-event": "^7.1.2", "react": "^16.13.1", "react-dom": "^16.13.1", + "react-router-dom": "^5.2.0", "react-scripts": "3.4.3" }, "scripts": { diff --git a/malarial-detection/yarn.lock b/malarial-detection/yarn.lock index 0c847c7..ba9b005 100644 --- a/malarial-detection/yarn.lock +++ b/malarial-detection/yarn.lock @@ -1004,7 +1004,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.5.1": +"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.5.1", "@babel/runtime@^7.5.5": version "7.11.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736" integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw== @@ -4982,6 +4982,18 @@ hex-color-regex@^1.1.0: resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== +history@^4.9.0: + version "4.10.1" + resolved "https://registry.yarnpkg.com/history/-/history-4.10.1.tgz#33371a65e3a83b267434e2b3f3b1b4c58aad4cf3" + integrity sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew== + dependencies: + "@babel/runtime" "^7.1.2" + loose-envify "^1.2.0" + resolve-pathname "^3.0.0" + tiny-invariant "^1.0.2" + tiny-warning "^1.0.0" + value-equal "^1.0.1" + hmac-drbg@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -4991,6 +5003,13 @@ hmac-drbg@^1.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" +hoist-non-react-statics@^3.1.0: + version "3.3.2" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" + integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== + dependencies: + react-is "^16.7.0" + hosted-git-info@^2.1.4: version "2.8.8" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" @@ -5658,6 +5677,11 @@ is-wsl@^2.1.1: resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.1.1.tgz#4a1c152d429df3d441669498e2486d3596ebaf1d" integrity sha512-umZHcSrwlDHo2TGMXv0DZ8dIUGunZ2Iv68YZnrmCiBPkZ4aaOhtv7pXJKeki9k3qJ3RJr0cDyitcl5wEH3AYog== +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -6508,7 +6532,7 @@ loglevel@^1.6.8: resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.8.tgz#8a25fb75d092230ecd4457270d80b54e28011171" integrity sha512-bsU7+gc9AJ2SqpzxwU3+1fedl8zAntbtC5XYlt3s2j1hJcn2PsXSmgN8TaLG/J1/2mod4+cE/3vNL70/c1RNCA== -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -6696,6 +6720,14 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== +mini-create-react-context@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/mini-create-react-context/-/mini-create-react-context-0.4.0.tgz#df60501c83151db69e28eac0ef08b4002efab040" + integrity sha512-b0TytUgFSbgFJGzJqXPKCFCBWigAjpjo+Fl7Vf7ZbKRDptszpppKxXH6DRXEABZ/gcEQczeb0iZ7JvL8e8jjCA== + dependencies: + "@babel/runtime" "^7.5.5" + tiny-warning "^1.0.3" + mini-css-extract-plugin@0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.9.0.tgz#47f2cf07aa165ab35733b1fc97d4c46c0564339e" @@ -7470,6 +7502,13 @@ path-to-regexp@0.1.7: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= +path-to-regexp@^1.7.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a" + integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== + dependencies: + isarray "0.0.1" + path-type@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" @@ -8560,11 +8599,40 @@ react-error-overlay@^6.0.7: resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.7.tgz#1dcfb459ab671d53f660a991513cb2f0a0553108" integrity sha512-TAv1KJFh3RhqxNvhzxj6LeT5NWklP6rDr2a0jaTfsZ5wSZWHOGeqQyejUp3xxLfPt2UpyJEcVQB/zyPcmonNFA== -react-is@^16.12.0, react-is@^16.8.1, react-is@^16.8.4: +react-is@^16.12.0, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +react-router-dom@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.2.0.tgz#9e65a4d0c45e13289e66c7b17c7e175d0ea15662" + integrity sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA== + dependencies: + "@babel/runtime" "^7.1.2" + history "^4.9.0" + loose-envify "^1.3.1" + prop-types "^15.6.2" + react-router "5.2.0" + tiny-invariant "^1.0.2" + tiny-warning "^1.0.0" + +react-router@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.2.0.tgz#424e75641ca8747fbf76e5ecca69781aa37ea293" + integrity sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw== + dependencies: + "@babel/runtime" "^7.1.2" + history "^4.9.0" + hoist-non-react-statics "^3.1.0" + loose-envify "^1.3.1" + mini-create-react-context "^0.4.0" + path-to-regexp "^1.7.0" + prop-types "^15.6.2" + react-is "^16.6.0" + tiny-invariant "^1.0.2" + tiny-warning "^1.0.0" + react-scripts@3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/react-scripts/-/react-scripts-3.4.3.tgz#21de5eb93de41ee92cd0b85b0e1298d0bb2e6c51" @@ -8918,6 +8986,11 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== +resolve-pathname@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd" + integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng== + resolve-url-loader@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/resolve-url-loader/-/resolve-url-loader-3.1.1.tgz#28931895fa1eab9be0647d3b2958c100ae3c0bf0" @@ -9946,6 +10019,16 @@ timsort@^0.3.0: resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= +tiny-invariant@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.1.0.tgz#634c5f8efdc27714b7f386c35e6760991d230875" + integrity sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw== + +tiny-warning@^1.0.0, tiny-warning@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" + integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -10286,6 +10369,11 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" +value-equal@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-1.0.1.tgz#1e0b794c734c5c0cade179c437d356d931a34d6c" + integrity sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw== + vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" From bedeaee9cab974741709e514d1dad5af6f31769b Mon Sep 17 00:00:00 2001 From: Amber-Williams Date: Mon, 24 Aug 2020 18:28:39 +0100 Subject: [PATCH 04/12] App routing added with mock components --- malarial-detection/src/App.js | 18 ++--------- .../src/components/router/router.js | 31 +++++++++++++++++++ malarial-detection/src/logo.svg | 7 ----- 3 files changed, 33 insertions(+), 23 deletions(-) create mode 100644 malarial-detection/src/components/router/router.js delete mode 100644 malarial-detection/src/logo.svg diff --git a/malarial-detection/src/App.js b/malarial-detection/src/App.js index 95683d6..d8f04b7 100644 --- a/malarial-detection/src/App.js +++ b/malarial-detection/src/App.js @@ -1,26 +1,12 @@ import "./App.css"; - import React from "react"; - -import logo from "./logo.svg"; +import Router from "./components/router/router" function App() { return (
- logo -

- Edit src/App.js and save to reload. -

- - {" "} - Learn React - +
); diff --git a/malarial-detection/src/components/router/router.js b/malarial-detection/src/components/router/router.js new file mode 100644 index 0000000..d731444 --- /dev/null +++ b/malarial-detection/src/components/router/router.js @@ -0,0 +1,31 @@ +import React from "react"; +import { + BrowserRouter, + Switch, + Route, + Link +} from "react-router-dom"; + +const Router = () => ( + + + + + + + +); + +const Home = () => ( +

Home

+); + +const About = () => ( +

About

+); + +const Users = () => ( +

Users

+); + +export default Router; \ No newline at end of file diff --git a/malarial-detection/src/logo.svg b/malarial-detection/src/logo.svg deleted file mode 100644 index 6b60c10..0000000 --- a/malarial-detection/src/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - From 29a0434b94dd72137c2717e141a12409d0e7270f Mon Sep 17 00:00:00 2001 From: Amber-Williams Date: Mon, 24 Aug 2020 18:45:36 +0100 Subject: [PATCH 05/12] Cleaned code --- malarial-detection/src/components/router/router.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/malarial-detection/src/components/router/router.js b/malarial-detection/src/components/router/router.js index d731444..2821127 100644 --- a/malarial-detection/src/components/router/router.js +++ b/malarial-detection/src/components/router/router.js @@ -2,8 +2,7 @@ import React from "react"; import { BrowserRouter, Switch, - Route, - Link + Route } from "react-router-dom"; const Router = () => ( From a237eea630d75aa084d08215aa8a2f528c74c4cb Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Mon, 24 Aug 2020 17:50:08 +0000 Subject: [PATCH 06/12] Restyled by clang-format --- malarial-detection/src/App.js | 10 ++----- .../src/components/router/router.js | 29 +++++++------------ 2 files changed, 14 insertions(+), 25 deletions(-) diff --git a/malarial-detection/src/App.js b/malarial-detection/src/App.js index d8f04b7..9d1ce98 100644 --- a/malarial-detection/src/App.js +++ b/malarial-detection/src/App.js @@ -3,13 +3,9 @@ import React from "react"; import Router from "./components/router/router" function App() { - return ( -
-
- -
-
- ); + return (
+
+
); } export default App; diff --git a/malarial-detection/src/components/router/router.js b/malarial-detection/src/components/router/router.js index 2821127..6fb7a33 100644 --- a/malarial-detection/src/components/router/router.js +++ b/malarial-detection/src/components/router/router.js @@ -1,30 +1,23 @@ import React from "react"; -import { - BrowserRouter, - Switch, - Route -} from "react-router-dom"; +import {BrowserRouter, Route, Switch} from "react-router-dom"; -const Router = () => ( - - - - - +const Router = () => + ( + + + < Route path = "/" component = { Home } /> - + ); const Home = () => ( -

Home

-); +

Home

); -const About = () => ( -

About

+const About = () => (

About

); const Users = () => ( -

Users

-); +

Users

); export default Router; \ No newline at end of file From ba303a3ce8037215331f921f538d3fa70c89afaa Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Mon, 24 Aug 2020 17:50:10 +0000 Subject: [PATCH 07/12] Restyled by prettier --- malarial-detection/src/App.js | 12 +++++--- .../src/components/router/router.js | 29 +++++++++---------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/malarial-detection/src/App.js b/malarial-detection/src/App.js index 9d1ce98..9b0e72b 100644 --- a/malarial-detection/src/App.js +++ b/malarial-detection/src/App.js @@ -1,11 +1,15 @@ import "./App.css"; import React from "react"; -import Router from "./components/router/router" +import Router from "./components/router/router"; function App() { - return (
-
-
); + return ( +
+
+ +
+
+ ); } export default App; diff --git a/malarial-detection/src/components/router/router.js b/malarial-detection/src/components/router/router.js index 6fb7a33..8952348 100644 --- a/malarial-detection/src/components/router/router.js +++ b/malarial-detection/src/components/router/router.js @@ -1,23 +1,20 @@ import React from "react"; -import {BrowserRouter, Route, Switch} from "react-router-dom"; +import { BrowserRouter, Route, Switch } from "react-router-dom"; -const Router = () => - ( - - - < Route path = "/" component = { Home } /> - - +const Router = () => ( + + + + + + + ); -const Home = () => ( -

Home

); +const Home = () =>

Home

; -const About = () => (

About

-); +const About = () =>

About

; -const Users = () => ( -

Users

); +const Users = () =>

Users

; -export default Router; \ No newline at end of file +export default Router; From 2df496f02085618edf01dc836da4ab24dd1ae5d9 Mon Sep 17 00:00:00 2001 From: Asim Date: Sun, 30 Aug 2020 02:26:05 +0500 Subject: [PATCH 08/12] folder structure done --- malarial-detection/src/helpers/helpers.txt | 0 malarial-detection/src/layouts/layouts.txt | 0 malarial-detection/src/{ => pages}/App.js | 0 malarial-detection/src/{ => pages}/App.test.js | 0 malarial-detection/src/{ => pages}/index.js | 0 malarial-detection/src/{ => pages}/serviceWorker.js | 0 malarial-detection/src/{ => pages}/setupTests.js | 0 malarial-detection/src/{ => styles}/App.css | 0 malarial-detection/src/{ => styles}/index.css | 0 9 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 malarial-detection/src/helpers/helpers.txt create mode 100644 malarial-detection/src/layouts/layouts.txt rename malarial-detection/src/{ => pages}/App.js (100%) rename malarial-detection/src/{ => pages}/App.test.js (100%) rename malarial-detection/src/{ => pages}/index.js (100%) rename malarial-detection/src/{ => pages}/serviceWorker.js (100%) rename malarial-detection/src/{ => pages}/setupTests.js (100%) rename malarial-detection/src/{ => styles}/App.css (100%) rename malarial-detection/src/{ => styles}/index.css (100%) diff --git a/malarial-detection/src/helpers/helpers.txt b/malarial-detection/src/helpers/helpers.txt new file mode 100644 index 0000000..e69de29 diff --git a/malarial-detection/src/layouts/layouts.txt b/malarial-detection/src/layouts/layouts.txt new file mode 100644 index 0000000..e69de29 diff --git a/malarial-detection/src/App.js b/malarial-detection/src/pages/App.js similarity index 100% rename from malarial-detection/src/App.js rename to malarial-detection/src/pages/App.js diff --git a/malarial-detection/src/App.test.js b/malarial-detection/src/pages/App.test.js similarity index 100% rename from malarial-detection/src/App.test.js rename to malarial-detection/src/pages/App.test.js diff --git a/malarial-detection/src/index.js b/malarial-detection/src/pages/index.js similarity index 100% rename from malarial-detection/src/index.js rename to malarial-detection/src/pages/index.js diff --git a/malarial-detection/src/serviceWorker.js b/malarial-detection/src/pages/serviceWorker.js similarity index 100% rename from malarial-detection/src/serviceWorker.js rename to malarial-detection/src/pages/serviceWorker.js diff --git a/malarial-detection/src/setupTests.js b/malarial-detection/src/pages/setupTests.js similarity index 100% rename from malarial-detection/src/setupTests.js rename to malarial-detection/src/pages/setupTests.js diff --git a/malarial-detection/src/App.css b/malarial-detection/src/styles/App.css similarity index 100% rename from malarial-detection/src/App.css rename to malarial-detection/src/styles/App.css diff --git a/malarial-detection/src/index.css b/malarial-detection/src/styles/index.css similarity index 100% rename from malarial-detection/src/index.css rename to malarial-detection/src/styles/index.css From 82a0bafbbbf93fdb90f07c59ede11789570ec47a Mon Sep 17 00:00:00 2001 From: Asim Date: Sun, 30 Aug 2020 02:30:44 +0500 Subject: [PATCH 09/12] changes with addressing --- malarial-detection/src/pages/App.js | 4 ++-- malarial-detection/src/pages/index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/malarial-detection/src/pages/App.js b/malarial-detection/src/pages/App.js index 9b0e72b..1de7835 100644 --- a/malarial-detection/src/pages/App.js +++ b/malarial-detection/src/pages/App.js @@ -1,6 +1,6 @@ -import "./App.css"; +import "pages/App.css"; import React from "react"; -import Router from "./components/router/router"; +import Router from "components/router/router"; function App() { return ( diff --git a/malarial-detection/src/pages/index.js b/malarial-detection/src/pages/index.js index 79b5524..0907cfd 100644 --- a/malarial-detection/src/pages/index.js +++ b/malarial-detection/src/pages/index.js @@ -1,4 +1,4 @@ -import "./index.css"; +import "styles/index.css"; import React from "react"; import ReactDOM from "react-dom"; From 22498eba8c16dc7c4e553a6ea59e98122629811d Mon Sep 17 00:00:00 2001 From: Asim Date: Tue, 8 Sep 2020 22:53:48 +0500 Subject: [PATCH 10/12] separate pages made --- malarial-detection/src/components/router/router.js | 6 +++--- malarial-detection/src/pages/Homepage.js | 0 malarial-detection/src/pages/about.js | 0 malarial-detection/src/pages/users.js | 0 4 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 malarial-detection/src/pages/Homepage.js create mode 100644 malarial-detection/src/pages/about.js create mode 100644 malarial-detection/src/pages/users.js diff --git a/malarial-detection/src/components/router/router.js b/malarial-detection/src/components/router/router.js index 8952348..8b16710 100644 --- a/malarial-detection/src/components/router/router.js +++ b/malarial-detection/src/components/router/router.js @@ -4,9 +4,9 @@ import { BrowserRouter, Route, Switch } from "react-router-dom"; const Router = () => ( - - - + + + ); diff --git a/malarial-detection/src/pages/Homepage.js b/malarial-detection/src/pages/Homepage.js new file mode 100644 index 0000000..e69de29 diff --git a/malarial-detection/src/pages/about.js b/malarial-detection/src/pages/about.js new file mode 100644 index 0000000..e69de29 diff --git a/malarial-detection/src/pages/users.js b/malarial-detection/src/pages/users.js new file mode 100644 index 0000000..e69de29 From 42d62191b3780dcb949d69241e23b54232a09cba Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 8 Sep 2020 17:54:25 +0000 Subject: [PATCH 11/12] Restyled by clang-format --- .../src/components/router/router.js | 8 +- malarial-detection/src/pages/App.js | 13 +- malarial-detection/src/pages/App.test.js | 4 +- malarial-detection/src/pages/serviceWorker.js | 143 ++++++++---------- 4 files changed, 76 insertions(+), 92 deletions(-) diff --git a/malarial-detection/src/components/router/router.js b/malarial-detection/src/components/router/router.js index 8b16710..18f0581 100644 --- a/malarial-detection/src/components/router/router.js +++ b/malarial-detection/src/components/router/router.js @@ -1,12 +1,14 @@ import React from "react"; -import { BrowserRouter, Route, Switch } from "react-router-dom"; +import {BrowserRouter, Route, Switch} from "react-router-dom"; const Router = () => ( - + - + ); diff --git a/malarial-detection/src/pages/App.js b/malarial-detection/src/pages/App.js index 1de7835..979a161 100644 --- a/malarial-detection/src/pages/App.js +++ b/malarial-detection/src/pages/App.js @@ -1,15 +1,12 @@ import "pages/App.css"; -import React from "react"; + import Router from "components/router/router"; +import React from "react"; function App() { - return ( -
-
- -
-
- ); + return (
+
+
); } export default App; diff --git a/malarial-detection/src/pages/App.test.js b/malarial-detection/src/pages/App.test.js index 71866a7..099314c 100644 --- a/malarial-detection/src/pages/App.test.js +++ b/malarial-detection/src/pages/App.test.js @@ -1,10 +1,10 @@ -import { render } from "@testing-library/react"; +import {render} from "@testing-library/react"; import React from "react"; import App from "./App"; test("renders learn react link", () => { - const { getByText } = render(); + const {getByText} = render(); const linkElement = getByText(/learn react/i); expect(linkElement).toBeInTheDocument(); }); diff --git a/malarial-detection/src/pages/serviceWorker.js b/malarial-detection/src/pages/serviceWorker.js index 9188b0c..7233726 100644 --- a/malarial-detection/src/pages/serviceWorker.js +++ b/malarial-detection/src/pages/serviceWorker.js @@ -10,15 +10,13 @@ // To learn more about the benefits of this model and instructions on how to // opt-in, read https://bit.ly/CRA-PWA -const isLocalhost = Boolean( - window.location.hostname === "localhost" || - // [::1] is the IPv6 localhost address. - window.location.hostname === "[::1]" || - // 127.0.0.0/8 are considered localhost for IPv4. - window.location.hostname.match( - /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ - ) -); +const isLocalhost = + Boolean(window.location.hostname === "localhost" || + // [::1] is the IPv6 localhost address. + window.location.hostname === "[::1]" || + // 127.0.0.0/8 are considered localhost for IPv4. + window.location.hostname.match( + /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)); export function register(config) { if (process.env.NODE_ENV === "production" && "serviceWorker" in navigator) { @@ -43,10 +41,8 @@ export function register(config) { // Add some additional logging to localhost, pointing developers to the // service worker/PWA documentation. navigator.serviceWorker.ready.then(() => { - console.log( - "This web app is being served cache-first by a service " + - "worker. To learn more, visit https://bit.ly/CRA-PWA" - ); + console.log("This web app is being served cache-first by a service " + + "worker. To learn more, visit https://bit.ly/CRA-PWA"); }); } else { // Is not localhost. Just register service worker @@ -57,88 +53,77 @@ export function register(config) { } function registerValidSW(swUrl, config) { - navigator.serviceWorker - .register(swUrl) - .then((registration) => { - registration.onupdatefound = () => { - const installingWorker = registration.installing; - if (installingWorker == null) { - return; - } - installingWorker.onstatechange = () => { - if (installingWorker.state === "installed") { - if (navigator.serviceWorker.controller) { - // At this point, the updated precached content has been - // fetched, but the previous service worker will still serve the - // older content until all client tabs are closed. - console.log( - "New content is available and will be used when all " + - "tabs for this page are closed. See https://bit.ly/CRA-PWA." - ); + navigator.serviceWorker.register(swUrl) + .then((registration) => { + registration.onupdatefound = () => { + const installingWorker = registration.installing; + if (installingWorker == null) { + return; + } + installingWorker.onstatechange = () => { + if (installingWorker.state === "installed") { + if (navigator.serviceWorker.controller) { + // At this point, the updated precached content has been + // fetched, but the previous service worker will still serve the + // older content until all client tabs are closed. + console.log( + "New content is available and will be used when all " + + "tabs for this page are closed. See https://bit.ly/CRA-PWA."); - // Execute callback - if (config && config.onUpdate) { - config.onUpdate(registration); - } - } else { - // At this point, everything has been precached. - // It's the perfect time to display a - // "Content is cached for offline use." message. - console.log("Content is cached for offline use."); + // Execute callback + if (config && config.onUpdate) { + config.onUpdate(registration); + } + } else { + // At this point, everything has been precached. + // It's the perfect time to display a + // "Content is cached for offline use." message. + console.log("Content is cached for offline use."); - // Execute callback - if (config && config.onSuccess) { - config.onSuccess(registration); + // Execute callback + if (config && config.onSuccess) { + config.onSuccess(registration); + } } } - } + }; }; - }; - }) - .catch((error) => { - console.error("Error during service worker registration:", error); - }); + }) + .catch((error) => { + console.error("Error during service worker registration:", error); + }); } function checkValidServiceWorker(swUrl, config) { // Check if the service worker can be found. If it can't reload the page. fetch(swUrl, { - headers: { "Service-Worker": "script" }, + headers : {"Service-Worker" : "script"}, }) - .then((response) => { - // Ensure service worker exists, and that we really are getting a JS - // file. - const contentType = response.headers.get("content-type"); - if ( - response.status === 404 || - (contentType != null && contentType.indexOf("javascript") === -1) - ) { - // No service worker found. Probably a different app. Reload the page. - navigator.serviceWorker.ready.then((registration) => { - registration.unregister().then(() => { - window.location.reload(); + .then((response) => { + // Ensure service worker exists, and that we really are getting a JS + // file. + const contentType = response.headers.get("content-type"); + if (response.status === 404 || + (contentType != null && contentType.indexOf("javascript") === -1)) { + // No service worker found. Probably a different app. Reload the page. + navigator.serviceWorker.ready.then((registration) => { + registration.unregister().then(() => { window.location.reload(); }); }); - }); - } else { - // Service worker found. Proceed as normal. - registerValidSW(swUrl, config); - } - }) - .catch(() => { - console.log( - "No internet connection found. App is running in offline mode." - ); - }); + } else { + // Service worker found. Proceed as normal. + registerValidSW(swUrl, config); + } + }) + .catch(() => { + console.log( + "No internet connection found. App is running in offline mode."); + }); } export function unregister() { if ("serviceWorker" in navigator) { navigator.serviceWorker.ready - .then((registration) => { - registration.unregister(); - }) - .catch((error) => { - console.error(error.message); - }); + .then((registration) => { registration.unregister(); }) + .catch((error) => { console.error(error.message); }); } } From a19941ab3033911796c0b4d36725e008128c9434 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 8 Sep 2020 17:54:28 +0000 Subject: [PATCH 12/12] Restyled by prettier --- .../src/components/router/router.js | 8 +- malarial-detection/src/pages/App.js | 10 +- malarial-detection/src/pages/App.test.js | 4 +- malarial-detection/src/pages/serviceWorker.js | 143 ++++++++++-------- 4 files changed, 91 insertions(+), 74 deletions(-) diff --git a/malarial-detection/src/components/router/router.js b/malarial-detection/src/components/router/router.js index 18f0581..8b16710 100644 --- a/malarial-detection/src/components/router/router.js +++ b/malarial-detection/src/components/router/router.js @@ -1,14 +1,12 @@ import React from "react"; -import {BrowserRouter, Route, Switch} from "react-router-dom"; +import { BrowserRouter, Route, Switch } from "react-router-dom"; const Router = () => ( - + - + ); diff --git a/malarial-detection/src/pages/App.js b/malarial-detection/src/pages/App.js index 979a161..80e48b8 100644 --- a/malarial-detection/src/pages/App.js +++ b/malarial-detection/src/pages/App.js @@ -4,9 +4,13 @@ import Router from "components/router/router"; import React from "react"; function App() { - return (
-
-
); + return ( +
+
+ +
+
+ ); } export default App; diff --git a/malarial-detection/src/pages/App.test.js b/malarial-detection/src/pages/App.test.js index 099314c..71866a7 100644 --- a/malarial-detection/src/pages/App.test.js +++ b/malarial-detection/src/pages/App.test.js @@ -1,10 +1,10 @@ -import {render} from "@testing-library/react"; +import { render } from "@testing-library/react"; import React from "react"; import App from "./App"; test("renders learn react link", () => { - const {getByText} = render(); + const { getByText } = render(); const linkElement = getByText(/learn react/i); expect(linkElement).toBeInTheDocument(); }); diff --git a/malarial-detection/src/pages/serviceWorker.js b/malarial-detection/src/pages/serviceWorker.js index 7233726..9188b0c 100644 --- a/malarial-detection/src/pages/serviceWorker.js +++ b/malarial-detection/src/pages/serviceWorker.js @@ -10,13 +10,15 @@ // To learn more about the benefits of this model and instructions on how to // opt-in, read https://bit.ly/CRA-PWA -const isLocalhost = - Boolean(window.location.hostname === "localhost" || - // [::1] is the IPv6 localhost address. - window.location.hostname === "[::1]" || - // 127.0.0.0/8 are considered localhost for IPv4. - window.location.hostname.match( - /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)); +const isLocalhost = Boolean( + window.location.hostname === "localhost" || + // [::1] is the IPv6 localhost address. + window.location.hostname === "[::1]" || + // 127.0.0.0/8 are considered localhost for IPv4. + window.location.hostname.match( + /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ + ) +); export function register(config) { if (process.env.NODE_ENV === "production" && "serviceWorker" in navigator) { @@ -41,8 +43,10 @@ export function register(config) { // Add some additional logging to localhost, pointing developers to the // service worker/PWA documentation. navigator.serviceWorker.ready.then(() => { - console.log("This web app is being served cache-first by a service " + - "worker. To learn more, visit https://bit.ly/CRA-PWA"); + console.log( + "This web app is being served cache-first by a service " + + "worker. To learn more, visit https://bit.ly/CRA-PWA" + ); }); } else { // Is not localhost. Just register service worker @@ -53,77 +57,88 @@ export function register(config) { } function registerValidSW(swUrl, config) { - navigator.serviceWorker.register(swUrl) - .then((registration) => { - registration.onupdatefound = () => { - const installingWorker = registration.installing; - if (installingWorker == null) { - return; - } - installingWorker.onstatechange = () => { - if (installingWorker.state === "installed") { - if (navigator.serviceWorker.controller) { - // At this point, the updated precached content has been - // fetched, but the previous service worker will still serve the - // older content until all client tabs are closed. - console.log( - "New content is available and will be used when all " + - "tabs for this page are closed. See https://bit.ly/CRA-PWA."); + navigator.serviceWorker + .register(swUrl) + .then((registration) => { + registration.onupdatefound = () => { + const installingWorker = registration.installing; + if (installingWorker == null) { + return; + } + installingWorker.onstatechange = () => { + if (installingWorker.state === "installed") { + if (navigator.serviceWorker.controller) { + // At this point, the updated precached content has been + // fetched, but the previous service worker will still serve the + // older content until all client tabs are closed. + console.log( + "New content is available and will be used when all " + + "tabs for this page are closed. See https://bit.ly/CRA-PWA." + ); - // Execute callback - if (config && config.onUpdate) { - config.onUpdate(registration); - } - } else { - // At this point, everything has been precached. - // It's the perfect time to display a - // "Content is cached for offline use." message. - console.log("Content is cached for offline use."); + // Execute callback + if (config && config.onUpdate) { + config.onUpdate(registration); + } + } else { + // At this point, everything has been precached. + // It's the perfect time to display a + // "Content is cached for offline use." message. + console.log("Content is cached for offline use."); - // Execute callback - if (config && config.onSuccess) { - config.onSuccess(registration); - } + // Execute callback + if (config && config.onSuccess) { + config.onSuccess(registration); } } - }; + } }; - }) - .catch((error) => { - console.error("Error during service worker registration:", error); - }); + }; + }) + .catch((error) => { + console.error("Error during service worker registration:", error); + }); } function checkValidServiceWorker(swUrl, config) { // Check if the service worker can be found. If it can't reload the page. fetch(swUrl, { - headers : {"Service-Worker" : "script"}, + headers: { "Service-Worker": "script" }, }) - .then((response) => { - // Ensure service worker exists, and that we really are getting a JS - // file. - const contentType = response.headers.get("content-type"); - if (response.status === 404 || - (contentType != null && contentType.indexOf("javascript") === -1)) { - // No service worker found. Probably a different app. Reload the page. - navigator.serviceWorker.ready.then((registration) => { - registration.unregister().then(() => { window.location.reload(); }); + .then((response) => { + // Ensure service worker exists, and that we really are getting a JS + // file. + const contentType = response.headers.get("content-type"); + if ( + response.status === 404 || + (contentType != null && contentType.indexOf("javascript") === -1) + ) { + // No service worker found. Probably a different app. Reload the page. + navigator.serviceWorker.ready.then((registration) => { + registration.unregister().then(() => { + window.location.reload(); }); - } else { - // Service worker found. Proceed as normal. - registerValidSW(swUrl, config); - } - }) - .catch(() => { - console.log( - "No internet connection found. App is running in offline mode."); - }); + }); + } else { + // Service worker found. Proceed as normal. + registerValidSW(swUrl, config); + } + }) + .catch(() => { + console.log( + "No internet connection found. App is running in offline mode." + ); + }); } export function unregister() { if ("serviceWorker" in navigator) { navigator.serviceWorker.ready - .then((registration) => { registration.unregister(); }) - .catch((error) => { console.error(error.message); }); + .then((registration) => { + registration.unregister(); + }) + .catch((error) => { + console.error(error.message); + }); } }