JesseAbram / GBC_Class_Bridge

MIT License
0 stars 0 forks source link

Refactor #12

Open nayyirjutha opened 5 years ago

nayyirjutha commented 5 years ago

You are importing the Header component in every page when you can import it once in your App.js file and render it outside the <Switch> component. This: `

(
)} />
      </div>`

Will then become: `

        <Switch>
          <Route path="/Rinkeby" component={Rinkeby} />
          <Route path="/Kovan" component={Kovan} />
          <Route component={Page404} />
        </Switch>
      </div>`

and you will no longer need to render/import the <Header/> component in any other file.

https://github.com/JesseAbram/GBC_Class_Bridge/blob/39d6e30189c67043ef87d011464d559721e3a97d/front-end/src/App.js#L23

JgeYbwcDhCZJ9 commented 5 years ago

Thanks, we'll get that fixed before for the next release!