From cf8cfd22c57f2bdefa05a712c8357b069002a812 Mon Sep 17 00:00:00 2001 From: vngarg Date: Thu, 5 Mar 2020 00:51:27 +0530 Subject: [PATCH 1/6] Refactored --- src/{components => }/Settings/index.js | 0 src/{components => }/Settings/settings.js | 2 +- .../Settings/styles.module.css | 0 .../Create/addFootstep.js | 35 ++--- .../Create/addPath.js | 42 +++--- .../EditPath/editFootstep.js | 0 .../EditPath/editPath.js | 0 .../EditPath/index.js | 4 +- .../Landing/searchbar.js | 0 .../Layout/layout.js | 18 +-- .../Login/signUpFlow.js | 106 ++++++++------- .../Search/resultFootstepCard.js | 60 +++++---- .../Search/resultPathCard.js | 37 +++--- .../Search/searchResult.js | 24 ++-- .../User/footstepsCard.js | 52 ++++---- .../User/learningPathCard.js | 25 ++-- .../User/learningPaths.js | 8 +- .../Landing/index.js | 14 +- .../Layout/footer.js | 16 +-- .../Layout/loader.js | 0 src/{components => Stateless}/Layout/menu.js | 22 ++-- .../Layout/sideDrawer.js | 25 ++-- .../Login/loginFlow.js | 16 +-- src/{components => Stateless}/SEO/Facebook.js | 0 src/{components => Stateless}/SEO/SEO.js | 5 +- src/{components => Stateless}/SEO/Twitter.js | 0 src/{components => Stateless}/SEO/index.js | 0 src/{components => Stateless}/SEO/robots.txt | 0 src/{components => Stateless}/User/follow.js | 12 +- src/{components => Stateless}/User/index.js | 102 +++++++------- src/components/publicProfile.js | 124 +++++++++--------- src/pages/about.js | 6 +- src/pages/add.js | 4 +- src/pages/editPath.js | 2 +- src/pages/index.js | 4 +- src/pages/profile.js | 4 +- src/pages/search.js | 14 +- src/pages/settings.js | 4 +- src/utils/typography.js | 10 +- 39 files changed, 425 insertions(+), 372 deletions(-) rename src/{components => }/Settings/index.js (100%) rename src/{components => }/Settings/settings.js (99%) rename src/{components => }/Settings/styles.module.css (100%) rename src/{components => Statefull}/Create/addFootstep.js (85%) rename src/{components => Statefull}/Create/addPath.js (88%) rename src/{components => Statefull}/EditPath/editFootstep.js (100%) rename src/{components => Statefull}/EditPath/editPath.js (100%) rename src/{components => Statefull}/EditPath/index.js (94%) rename src/{components => Statefull}/Landing/searchbar.js (100%) rename src/{components => Statefull}/Layout/layout.js (92%) rename src/{components => Statefull}/Login/signUpFlow.js (78%) rename src/{components => Statefull}/Search/resultFootstepCard.js (77%) rename src/{components => Statefull}/Search/resultPathCard.js (68%) rename src/{components => Statefull}/Search/searchResult.js (84%) rename src/{components => Statefull}/User/footstepsCard.js (80%) rename src/{components => Statefull}/User/learningPathCard.js (67%) rename src/{components => Statefull}/User/learningPaths.js (81%) rename src/{components => Stateless}/Landing/index.js (59%) rename src/{components => Stateless}/Layout/footer.js (75%) rename src/{components => Stateless}/Layout/loader.js (100%) rename src/{components => Stateless}/Layout/menu.js (73%) rename src/{components => Stateless}/Layout/sideDrawer.js (73%) rename src/{components => Stateless}/Login/loginFlow.js (69%) rename src/{components => Stateless}/SEO/Facebook.js (100%) rename src/{components => Stateless}/SEO/SEO.js (97%) rename src/{components => Stateless}/SEO/Twitter.js (100%) rename src/{components => Stateless}/SEO/index.js (100%) rename src/{components => Stateless}/SEO/robots.txt (100%) rename src/{components => Stateless}/User/follow.js (59%) rename src/{components => Stateless}/User/index.js (69%) diff --git a/src/components/Settings/index.js b/src/Settings/index.js similarity index 100% rename from src/components/Settings/index.js rename to src/Settings/index.js diff --git a/src/components/Settings/settings.js b/src/Settings/settings.js similarity index 99% rename from src/components/Settings/settings.js rename to src/Settings/settings.js index f6a1de6..eddeea4 100644 --- a/src/components/Settings/settings.js +++ b/src/Settings/settings.js @@ -10,7 +10,7 @@ import "firebase/storage" import styles from "./styles.module.css" -import { client } from "../../apollo/client" +import { client } from "../apollo/client" export default class Settings extends Component { state = { diff --git a/src/components/Settings/styles.module.css b/src/Settings/styles.module.css similarity index 100% rename from src/components/Settings/styles.module.css rename to src/Settings/styles.module.css diff --git a/src/components/Create/addFootstep.js b/src/Statefull/Create/addFootstep.js similarity index 85% rename from src/components/Create/addFootstep.js rename to src/Statefull/Create/addFootstep.js index 9ff4e09..02eec8d 100644 --- a/src/components/Create/addFootstep.js +++ b/src/Statefull/Create/addFootstep.js @@ -4,7 +4,7 @@ import FileUploader from "react-firebase-file-uploader" import firebase from "firebase/app" import "firebase/storage" -import styles from "../../styles/add.module.css" +import addStyles from "../../styles/add.module.css" const { Option } = Select @@ -96,16 +96,16 @@ export class addFootstep extends Component { render() { return ( -
+
-
{this.props.index}
+
{this.props.index}
this.props.remove(this.props.data.id)} - className={styles.footstep_remove_btn} + className={addStyles.footstep_remove_btn} > X
@@ -114,18 +114,18 @@ export class addFootstep extends Component { -
Title
+
Title
-
Description
+
Description