Torvec / next-level-loot

Next Level Loot (Loot Vault v2)
https://next-level-loot.vercel.app/
MIT License
2 stars 0 forks source link

Refactor Routing #25

Closed Torvec closed 3 weeks ago

Torvec commented 3 weeks ago

Current Routing scheme is overly repetitive.

Current setup:

/app
  /best-deals
  page.tsx
    /[id]
    page.tsx
  /free-games
  page.tsx
    /[id]
    page.tsx
  /highest-rated
  page.tsx
    /[id]
    page.tsx
  /search-results
  page.tsx
  /wishlist
  page.tsx
layout.tsx
page.tsx

New Setup:

/app
  /[category]
  page.tsx
    /[id]
    page.tsx
  /wishlist
  page.tsx
layout.tsx
page.tsx

Just need to use params to select which fetch requests to make and how to format the response. The search results page will be handled differently so that there won't be a need for a specific page. Will make another issue to go over the details.