Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move from pages to app router #177

Open
11 tasks
brunomenezes opened this issue Jan 6, 2025 · 1 comment
Open
11 tasks

Move from pages to app router #177

brunomenezes opened this issue Jan 6, 2025 · 1 comment
Assignees
Labels
type:feature new feature or improvement over an existing feature

Comments

@brunomenezes
Copy link
Collaborator

📄 Context

As we are using nextJS 14, the idea is to move from the pages to the App router, which has a better way of loading server data before displaying the pages. e.g. that will improve how we load ENS cache data (Feat under review here #175) as we want to load only once, and _app.tsx doesn't support any of the server data fetch, besides hacky ways that can cause more harm than good.

✔️ Solution

Move all the page routes under pages/ to app/.

Other requirements:

  • Leverage data-fetching on the server in the layout.tsx. i.e. Avoid unnecessary network roundtrips.
  • Evaluate the need for ISR generation now that we can access the ENS information cached and on the fly in the server.

📈 Subtasks

  • Port routes from pages/ to app/ router.
  • Make adjustments between client and server components (as necessary)
  • Refactor ENS cache initial load to be a single call with page load (i.e. use layout.tsx)
  • Evaluate ISR utility and refactor (as necessary)
  • Fix test suites (as necessary)

🎯 Definition of Done

  • All the pages render as expected.
  • ENS initial cache data is available for context in a single trip.
  • All staking operations are working.
  • Explorer loads inside safe.global wallet App
  • CI checks are passing.
  • Vercel builds are passing.
@brunomenezes brunomenezes added the type:feature new feature or improvement over an existing feature label Jan 6, 2025
@brunomenezes brunomenezes self-assigned this Jan 6, 2025
@github-project-automation github-project-automation bot moved this to 📌 Todo in Explorer Unit Jan 6, 2025
@brunomenezes
Copy link
Collaborator Author

brunomenezes commented Jan 15, 2025

Before making that move, a few changes will be made to make it less painful in a single shot. I will split the bullet into necessary and optional ones related to that issue specifically

Related work

@brunomenezes brunomenezes mentioned this issue Feb 2, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature new feature or improvement over an existing feature
Projects
Status: 📌 Todo
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant