From fcfcebebc83b64cdcffdca60303b426c067ea798 Mon Sep 17 00:00:00 2001 From: oscarzhou Date: Sun, 13 Dec 2020 19:45:03 +1300 Subject: [PATCH] component: change the folder structure by putting the Layout under hoc folder --- src/App.js | 2 +- src/components/Burger/OrderSummary/OrderSummary.js | 2 +- src/components/Navigation/SideDrawer/SideDrawer.js | 2 +- src/components/UI/Modal/Modal.js | 2 +- src/containers/BurgerBuilder/BurgerBuilder.js | 2 +- src/hoc/{ => Auxiliary}/Auxiliary.js | 0 src/{components => hoc}/Layout/Layout.css | 0 src/{components => hoc}/Layout/Layout.js | 6 +++--- 8 files changed, 8 insertions(+), 8 deletions(-) rename src/hoc/{ => Auxiliary}/Auxiliary.js (100%) rename src/{components => hoc}/Layout/Layout.css (100%) rename src/{components => hoc}/Layout/Layout.js (81%) diff --git a/src/App.js b/src/App.js index a108cfa..bb289f2 100644 --- a/src/App.js +++ b/src/App.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; -import Layout from './components/Layout/Layout'; +import Layout from './hoc/Layout/Layout'; import BurgerBuilder from './containers/BurgerBuilder/BurgerBuilder'; class App extends Component { diff --git a/src/components/Burger/OrderSummary/OrderSummary.js b/src/components/Burger/OrderSummary/OrderSummary.js index 90cd2c3..59d73f7 100644 --- a/src/components/Burger/OrderSummary/OrderSummary.js +++ b/src/components/Burger/OrderSummary/OrderSummary.js @@ -1,6 +1,6 @@ import React from 'react'; -import Aux from '../../../hoc/Auxiliary'; +import Aux from '../../../hoc/Auxiliary/Auxiliary'; import Button from '../../UI/Button/Button'; const orderSummary = (props) => { diff --git a/src/components/Navigation/SideDrawer/SideDrawer.js b/src/components/Navigation/SideDrawer/SideDrawer.js index 518789d..10d6bee 100644 --- a/src/components/Navigation/SideDrawer/SideDrawer.js +++ b/src/components/Navigation/SideDrawer/SideDrawer.js @@ -3,7 +3,7 @@ import React from 'react'; import classes from './SideDrawer.css'; import Logo from '../../Logo/Logo'; import NavigationItems from '../NavigationItems/NavigationItems'; -import Aux from '../../../hoc/Auxiliary'; +import Aux from '../../../hoc/Auxiliary/Auxiliary'; import Backdrop from '../../UI/Backdrop/Backdrop'; const sideDrawer = (props) => { diff --git a/src/components/UI/Modal/Modal.js b/src/components/UI/Modal/Modal.js index e3452a3..6b34ed1 100644 --- a/src/components/UI/Modal/Modal.js +++ b/src/components/UI/Modal/Modal.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; -import Aux from '../../../hoc/Auxiliary'; +import Aux from '../../../hoc/Auxiliary/Auxiliary'; import Backdrop from '../Backdrop/Backdrop'; import classes from './Modal.css'; diff --git a/src/containers/BurgerBuilder/BurgerBuilder.js b/src/containers/BurgerBuilder/BurgerBuilder.js index dff4b78..d76b839 100644 --- a/src/containers/BurgerBuilder/BurgerBuilder.js +++ b/src/containers/BurgerBuilder/BurgerBuilder.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; -import Aux from '../../hoc/Auxiliary'; +import Aux from '../../hoc/Auxiliary/Auxiliary'; import Burger from '../../components/Burger/Burger'; import BuildControls from '../../components/Burger/BuildControls/BuildControls'; import Modal from '../../components/UI/Modal/Modal'; diff --git a/src/hoc/Auxiliary.js b/src/hoc/Auxiliary/Auxiliary.js similarity index 100% rename from src/hoc/Auxiliary.js rename to src/hoc/Auxiliary/Auxiliary.js diff --git a/src/components/Layout/Layout.css b/src/hoc/Layout/Layout.css similarity index 100% rename from src/components/Layout/Layout.css rename to src/hoc/Layout/Layout.css diff --git a/src/components/Layout/Layout.js b/src/hoc/Layout/Layout.js similarity index 81% rename from src/components/Layout/Layout.js rename to src/hoc/Layout/Layout.js index de610fe..d01104f 100644 --- a/src/components/Layout/Layout.js +++ b/src/hoc/Layout/Layout.js @@ -1,9 +1,9 @@ import React, { Component } from 'react'; -import Aux from '../../hoc/Auxiliary'; +import Aux from '../Auxiliary/Auxiliary'; import classes from './Layout.css'; -import Toolbar from '../Navigation/Toolbar/Toolbar'; -import SideDrawer from '../Navigation/SideDrawer/SideDrawer'; +import Toolbar from '../../components/Navigation/Toolbar/Toolbar'; +import SideDrawer from '../../components/Navigation/SideDrawer/SideDrawer'; class Layout extends Component { state = {