Skip to content

Frontend routes and components

wcorona269 edited this page Apr 25, 2022 · 7 revisions

Frontend Routes

For All Users

  • / - homepage
    • splash
  • /rests/:restId - restaraunt show page
  • /login
    • SessionForm
  • /signup
    • SessionForm

For Logged-in Users

  • /users/:userId
    • ProfileComponent
    • SavedRestIndex
      • SavedRestIndexItem
  • /reviews/new
    • ReviewComponent
  • /reviews/:reviewId/edit
  • /rsvps/:rsvpId
  • /rsvps/:rsvpId/edit - available when session user_id and RSVP user_id match

Components

  • /
    • SearchBar - includes RSVP criteria (date, time, party size)
    • RestarauntTheme1 - (Render different lists of restaurants under different "themes" (i.e. Award-Winning, Takeout, Italian). Render each list as a component.
      • ThemeIndex
        • ThemeIndexItem
    • RestaurantTheme2
      • ThemeIndex
        • ThemeIndexItem
  • /users/:userId
    • RsvpsIndex
      • RsvpIndexItem
    • ReviewsIndex
      • ReviewIndexItem
    • SavedRestsIndex
      • SavedRestIndexItem
  • /rests/:restId
    • RestShow
      • Header - Includes ratings, reviews, price range, and cuisine type
      • Photos
        • PhotosIndex
          • PhotosIndexItem
      • RsvpForm
      • MenuDetails
      • ContactDetails
      • Map
      • ReviewsIndex
        • ReviewIndexItem
  • /rests/:restId/reviews/new
    • ReviewForm
  • /reviews/:reviewId/edit
    • ReviewForm - autofill all info from previous review we are editing
  • /reviews/:reviewId/delete
    • DeleteModal - pop up to make sure you want to delete a review
  • /rsvps/new
    • RsvpForm
  • /rsvps/:rsvpId/edit
    • RsvpForm
  • /reviews/:reviewId/delete
    • DeleteModal - pop up to make sure you want to delete a review
Clone this wiki locally