Skip to content

feat(login): add SEO metadata via server-component layout - #32

Merged
FrankezeCode merged 1 commit into
BetterDevOrg:mainfrom
Dashetty:feat/login-metadata
Aug 1, 2026
Merged

feat(login): add SEO metadata via server-component layout#32
FrankezeCode merged 1 commit into
BetterDevOrg:mainfrom
Dashetty:feat/login-metadata

Conversation

@Dashetty

Copy link
Copy Markdown
Contributor

Summary

Adds SEO metadata for the /login page so the browser tab shows a proper title and search engines get an accurate description.
The login page is a client component ( "use client" ), and Next.js forbids metadata exports from client components. Following the issue's suggested approach, I added a small server-component layout.tsx at src/app/login/ that exports:

  • Title: Log in | BetterDev
  • Description: "Log in to BetterDev with your member email and 6-digit code. Access your Community ID, reputation, and meetup passport."
    This matches the existing pattern used on /meetup , /contact , and /careers . The login page itself is untouched, so the client-side session check and redirect-to-login flow work exactly as before.
    Bonus fix: corrected two pre-existing react/no-unescaped-entities lint errors in src/app/meetup/[meetupId]/page.tsx (unescaped apostrophes). These were failing npm run build on main before any of my changes and blocked the "build passes" done-condition.

Related issue

Fixes #14

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Other (describe below)

How to test

  1. Run npm run build — should pass with no errors (the meetup apostrophe fix is required for this).
  2. Run npm run dev and open http://localhost:3000/login .
  3. Browser tab should read "Log in | BetterDev".
  4. View page source (or DevTools → Elements) and confirm a tag with the login description is present.
  5. Open /profile while logged out — it should still redirect to /login?next=/profile (client-side redirect preserved).

Checklist

[x] I ran npm run build (and npm run contracts:test if contracts changed)
[x] I did not commit secrets or .env.local
[x] I read CONTRIBUTING.md

@FrankezeCode FrankezeCode left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You did a great work here , thanks so much 👍

@FrankezeCode
FrankezeCode merged commit 9dc8cc3 into BetterDevOrg:main Aug 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.

[Good first issue]: Add page metadata to /login

2 participants