Skip to content

fix(seo): ssr the network list on /layer-2/networks#18068

Merged
wackerow merged 1 commit into
fix/find-wallet-ssr-17717from
fix/l2-networks-ssr
Apr 30, 2026
Merged

fix(seo): ssr the network list on /layer-2/networks#18068
wackerow merged 1 commit into
fix/find-wallet-ssr-17717from
fix/l2-networks-ssr

Conversation

@pettinarip
Copy link
Copy Markdown
Member

Summary

Follow-up to #18067. Same anti-SEO pattern: Layer2NetworksTable was mounted via dynamic(..., { ssr: false }), so the deployed HTML for /layer-2/networks contains only a loading skeleton — zero network names indexed by bots.

This PR drops the lazy wrapper and imports Layer2NetworksTable directly. The shared ProductTable SSR-safety work (useSearchParamswindow.location.search, MediaQuery removal) from #18067 carries over to this consumer unchanged, so no further surgery is needed in shared code.

Verification

dev.ethereum.org (deployed) this branch
Network names in SSR HTML 0 11 (Ethereum Mainnet, Arbitrum One, Base, Optimism, Starknet, Ink, Unichain, Scroll, ZKSync Era, Linea, …)
Loading skeleton in HTML yes no

Hydration smoke-checked in browser: 11 <tr> rows present, no console errors, expand/collapse + filters still work.

Dependency

Stacked on top of #18067 — that PR contains the shared ProductTable fixes this PR depends on. Merge order: #18067 first, then this.

Test plan

  • SSR HTML contains all network names
  • No hydration errors in dev tools
  • Filter sidebar + filter switches still function
  • Row expand/collapse still works
  • TypeScript + ESLint pass
  • CI green on Netlify
  • CrUX / RUM after merge to confirm real-world INP impact

Same pattern as /wallets/find-wallet (#18067, #17717): the page mounted
Layer2NetworksTable through a `dynamic(..., { ssr: false })` wrapper,
so Googlebot indexed only the loading skeleton — zero network names in
the HTML.

Drop the lazy wrapper and import directly. Add `"use client"` to
`Layer2NetworksTable` since it needs hooks (`useTranslation`,
`useNetworkFilters`) and is no longer crossing the boundary via
`dynamic()`. Delete the now-unused `lazy.tsx` and `loading.tsx`.

The shared `ProductTable` SSR fixes (`useSearchParams` → window.location,
`MediaQuery` wrapper removal) already landed in #18067 and apply
unchanged to this consumer.
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 29, 2026

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 9af32a0
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/69f33d68f211b60fdce9119c
😎 Deploy Preview https://deploy-preview-18068.ethereum.it
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 68 (🟢 up 19 from production)
Accessibility: 96 (🟢 up 3 from production)
Best Practices: 100 (no change from production)
SEO: 98 (🔴 down 1 from production)
PWA: 59 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@pettinarip pettinarip changed the base branch from dev to fix/find-wallet-ssr-17717 April 29, 2026 13:14
@pettinarip pettinarip marked this pull request as ready for review April 30, 2026 15:39
Copy link
Copy Markdown
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks @pettinarip

Thought for future while reviewing, would be nice to have animation on the opening/closing action of these rows.

@wackerow wackerow merged commit 99ecb53 into fix/find-wallet-ssr-17717 Apr 30, 2026
11 checks passed
@wackerow wackerow deleted the fix/l2-networks-ssr branch April 30, 2026 20:28
@wackerow wackerow mentioned this pull request May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants