fix: add per-page metadata to dashboard, download, and community pages#11
Merged
fix: add per-page metadata to dashboard, download, and community pages#11
Conversation
All three pages used 'use client' at the top level, which prevents
Next.js from exporting the metadata object. As a result, every page
shared the same generic homepage title and description — the
layout.tsx template ('%s | PingDiff') was dead code for these routes.
Fix: split each page into a thin server wrapper (exports metadata)
and a client component (holds all interactive state). This is the
standard App Router pattern for mixing metadata with client-side state.
Each page now has a distinct <title> and <meta description>:
/dashboard → 'Dashboard | PingDiff'
/download → 'Download | PingDiff'
/community → 'Community | PingDiff'
Also adds per-page og:title and og:description so social shares
(Twitter, Discord, iMessage) show accurate previews instead of the
generic homepage copy.
Build verified clean (no TypeScript or ESLint errors).
66b5009 to
4824f68
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
All three main pages (
/dashboard,/download,/community) had"use client"at the top level. In Next.js App Router, client components cannot exportmetadata— so every page fell back to the generic layout title/description. Thetemplate: "%s | PingDiff"inlayout.tsxwas dead code for these routes.Concrete impact:
Fix
Split each page into two files following the standard App Router pattern:
page.tsxmetadata, renders the client component*Client.tsxNo logic was changed; this is a pure structural refactor.
Result
Each page also gets its own
og:titleandog:descriptionfor correct social previews.Verification
npm run build— passes with no errorseslint— no lint errors introduced