Skip to content

fix: redirect logged-out users when clicking Follow on testimony#2063

Open
saschabuehrle wants to merge 1 commit intocodeforboston:mainfrom
saschabuehrle:fix/issue-2059
Open

fix: redirect logged-out users when clicking Follow on testimony#2063
saschabuehrle wants to merge 1 commit intocodeforboston:mainfrom
saschabuehrle:fix/issue-2059

Conversation

@saschabuehrle
Copy link

Bug

Issue #2059 reports that logged-out users can click the Follow button on a testimony page, but nothing happens.

Fix

This PR updates BaseFollowButton to redirect unauthenticated users to the login page when they click follow/unfollow.

  • uses router.push('/login?redirect=...') with the current path
  • keeps the existing follow/unfollow behavior unchanged for authenticated users

This makes the button behavior consistent with the rest of the app’s auth-protected flows.

Testing

  • YARN_IGNORE_ENGINES=1 yarn check-types
  • YARN_IGNORE_ENGINES=1 ./node_modules/.bin/eslint components/shared/FollowButton.tsx

Happy to address any feedback.

Greetings, saschabuehrle

@vercel
Copy link

vercel bot commented Mar 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
maple-dev Ready Ready Preview, Comment Mar 13, 2026 7:18am

Request Review

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.

1 participant