Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 14, 2025

Description

Logged-in users accessing /login or /signup are now redirected to /demo-app using useNavigate from react-router-dom.

Changes:

  • LoginPage.tsx & SignupPage.tsx: Added useEffect hook that checks auth status via useAuth() and redirects when user is present
  • authRedirectTests.spec.ts: E2e tests verifying redirect behavior for both routes
const { data: user } = useAuth();
const navigate = useNavigate();

useEffect(() => {
  if (user) {
    navigate("/demo-app");
  }
}, [user, navigate]);

Contributor Checklist

Original prompt

This section details on the original issue you should resolve

<issue_title>redirect from /login and /signup to /demo-app if logged in</issue_title>
<issue_description>use useNavigate from react-router-dom</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 14, 2025 14:12
Co-authored-by: vincanger <70215737+vincanger@users.noreply.github.com>
Co-authored-by: vincanger <70215737+vincanger@users.noreply.github.com>
Copilot AI changed the title [WIP] Redirect from /login and /signup to /demo-app if logged in Redirect logged-in users from /login and /signup to /demo-app Nov 14, 2025
Copilot AI requested a review from vincanger November 14, 2025 14:17
Copilot finished work on behalf of vincanger November 14, 2025 14:17
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.

redirect from /login and /signup to /demo-app if logged in

2 participants