feat: dynamic page title on route change#747
Conversation
✅ Deploy Preview for github-spy ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
📝 WalkthroughWalkthroughAdds a new ChangesDynamic Page Title and SEO Metadata
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Related Issue
Description
Ever noticed how the browser tab just says "GitHub Tracker" no matter which page you're on? This PR fixes that.
I created a small
usePageTitlehook that updatesdocument.titlewhenever you navigate to a new route. Now each page has its own meaningful title — so if you're on the Contributors page, the tab says "Contributors — GitHub Tracker", and if you're viewing a contributor's profile, it shows their username directly in the tab.This is a small change but makes the app feel a lot more polished, especially when you have multiple tabs open.
How Has This Been Tested?
Ran the dev server and manually navigated through all routes — Home, Tracker, About, Login, Sign Up, Contact, Contributors, Contributor Profile, Privacy Policy, and Activity. Verified the tab title updated correctly on each page. Also ran
npx tsc --noEmitwith no errors.Type of Change
Summary by CodeRabbit