Skip to content

Conversation

@ECWireless
Copy link
Collaborator

AI Summary

This pull request refactors the account-related pages (delegating, orchestrating, history) to use Next.js static generation (getStaticPaths/getStaticProps) for improved performance and SEO, and updates how dynamic components are loaded throughout the layouts. The main changes are the removal of client-side data fetching in favor of server-side/static data fetching and the use of dynamic imports for certain components to optimize bundle size and rendering.

Account Pages: Static Generation and Data Fetching

Dynamic Component Loading

  • Replaced static imports of several UI components in layouts/account.tsx and layouts/main.tsx (such as DelegatingView, DelegatingWidget, ConnectButton, Claim, TxConfirmedDialog, RegisterToVote) with dynamic imports using Next.js's dynamic() function and disabled server-side rendering for them. This helps reduce the initial JS bundle size and avoids SSR-related issues with browser-only components. [1] [2] [3] [4] [5]

App Layout Import Change

  • Changed the import of the main Layout component in _app.tsx from a dynamic import to a static import, ensuring layout is always server-rendered for consistency. [1] [2]

These changes collectively improve the performance, reliability, and maintainability of the account-related pages by leveraging Next.js's static generation and optimizing component loading.

Copilot AI review requested due to automatic review settings January 7, 2026 22:53
@ECWireless ECWireless linked an issue Jan 7, 2026 that may be closed by this pull request
@vercel
Copy link

vercel bot commented Jan 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
explorer-arbitrum-one Ready Ready Preview, Comment Jan 9, 2026 6:07pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request refactors account-related pages to use Next.js static generation (SSG) instead of client-side data fetching, improving performance and SEO. The changes move data fetching from the client to the server at build time, and optimize component loading by dynamically importing browser-only components with SSR disabled.

Key changes:

  • Converted three account pages (delegating, orchestrating, history) to use getStaticPaths and getStaticProps for static generation with ISR (revalidation every 600 seconds)
  • Refactored AccountLayout to accept account and orchestrator data as props instead of fetching them internally
  • Changed the main Layout component from dynamic to static import in _app.tsx to ensure it's always server-rendered
  • Dynamically imported several UI components (DelegatingView, DelegatingWidget, ConnectButton, Claim, TxConfirmedDialog, RegisterToVote) with SSR disabled to reduce initial bundle size

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
pages/accounts/[account]/orchestrating.tsx Added SSG with getStaticPaths and getStaticProps to pre-render orchestrator account pages at build time
pages/accounts/[account]/history.tsx Added SSG with getStaticPaths and getStaticProps to pre-render account history pages at build time
pages/accounts/[account]/delegating.tsx Added SSG with getStaticPaths and getStaticProps to pre-render delegator account pages at build time
pages/_app.tsx Changed Layout component from dynamic to static import for consistent SSR
layouts/main.tsx Added dynamic imports with SSR disabled for browser-only components to optimize bundle size
layouts/account.tsx Removed client-side SWR data fetching logic and refactored to accept data as props; added dynamic imports for client-only components

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-project-automation github-project-automation bot moved this from In Review to Todo in Explorer Revamp Jan 8, 2026
@Jipperism
Copy link
Collaborator

Getting 500 errors on the preview deployment but it doesn't seem like they are related to the PR, as all of them seem to happen in the API endpoints.

@ECWireless ECWireless moved this from Todo to In Review in Explorer Revamp Jan 9, 2026
@ECWireless ECWireless merged commit e601d1e into main Jan 9, 2026
6 checks passed
@ECWireless ECWireless deleted the 450-move-layout-component-back-to-ssr branch January 9, 2026 18:27
@github-project-automation github-project-automation bot moved this from In Review to Done in Explorer Revamp Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Move layout component back to SSR

3 participants