broach44/for-the-love-of-java

Routing Setup

Closed this issue · 1 comments

User Story

As a user I would like to see that when I navigate I am navigating to new pages throughout the application

AC

WHEN I navigate to new components
THEN I should see the URL in the browser bar change depending on the component I have selected.

Dev Notes

  • In the src/components directory create two different directories, one for the pages and one for shared components. Reusable components will be placed into the shared folder, such as a navbar. Components that are not reused will be placed in the pages directory.
  • Install react-router-dom.
  • The top of the App.js should include imports from react, react-router-dom, firebase/app and firebase/auth
  • Create routes and file structure for the components according to the notes in the comments below

MVP Component Routes

Page Component : Actual Route

  1. Home : /
  2. Profile : /profile
  3. Shops : /shops
  4. Shop Form : /shop/new
  5. Single Shop : /shop/:shopId
  6. Log Form : /shop/:shopId/log/new
  7. Log Form : /shop/:shopId/log/:logId/edit
  • Refer to App.js located here for example