Skip to content

fix(ui): add dynamic per-page browser tab titles based on route#220

Open
Git-Shubham14 wants to merge 1 commit into
imanchalsingh:mainfrom
Git-Shubham14:fix/dynamic-page-titles
Open

fix(ui): add dynamic per-page browser tab titles based on route#220
Git-Shubham14 wants to merge 1 commit into
imanchalsingh:mainfrom
Git-Shubham14:fix/dynamic-page-titles

Conversation

@Git-Shubham14

Copy link
Copy Markdown

Description

Fixes #194

Every page previously showed the same static browser tab title "ShareVault - File Sharing System" regardless of the current route. This made it impossible to distinguish multiple open tabs and hurt basic SEO.

Changes

  • client/src/App.tsx
    • Added DynamicTitle component that listens to route changes via useLocation
    • Created routeTitles map covering all routes in the app
    • Updates document.title on every navigation
    • Handles dynamic routes /share/:id → "Shared File — ShareVault" and /s/:token → "Accessing File — ShareVault"
    • Placed <DynamicTitle /> at the top of the app above <Routes>

Before

All pages: "ShareVault - File Sharing System"

After

  • / → "ShareVault — Secure File Sharing"
  • /login → "Login — ShareVault"
  • /register → "Register — ShareVault"
  • /home/myfiles → "My Files — ShareVault"
  • /home/analytics → "Analytics — ShareVault"
  • /home/favorites → "Favorites — ShareVault"
  • /home/shares → "Shares — ShareVault"
  • /home/settings → "Settings — ShareVault"
  • /share/:id → "Shared File — ShareVault"

Type of Change

  • Bug fix

Checklist

  • Code follows project style
  • Tested locally — tab title updates correctly on navigation
  • Updated documentation

@netlify

netlify Bot commented Jul 6, 2026

Copy link
Copy Markdown

👷 Deploy request for file-sharingsystem pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 97904f0

@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

@Git-Shubham14 is attempting to deploy a commit to the imanchalsingh Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added SSoC26 Official label of org bug Something isn't working frontend labels Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working frontend SSoC26 Official label of org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Browser tab title is static on all routes — no dynamic per-page titles

1 participant