fix: drop the unstyled /login page - #62
Merged
Merged
Conversation
pages/Login.jsx styled itself with `form_container` and `github-btn`, which are defined in no stylesheet, so it rendered as bare unstyled text. It was also redundant: the landing page already has a styled GitHub sign-in button that hits the same endpoint. /login now redirects to the landing page. The route is kept because AuthController still redirects there with ?error=auth_failed on OAuth failure, and axiosConfig with ?error=session_expired; those reasons are surfaced through the existing toast container instead of being dropped. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is low-risk and aligns routing behavior with the existing landing-page sign-in flow, with only minor follow-up nits noted in review comments.
Pull request overview
Removes an unused/unstyled standalone /login page and replaces it with a redirect that preserves user feedback by toasting auth-related ?error= reasons before sending users back to the landing page.
Changes:
- Deleted
pages/Login.jsx(unstyled duplicate login UI). - Added
LoginRedirectinApp.jsxto toast?error=values and redirect/login→/. - Updated the
/loginroute to renderLoginRedirectinstead of the removed page.
File summaries
| File | Description |
|---|---|
| gitforme/src/App.jsx | Replaces /login page rendering with a redirect component that surfaces auth errors via toast notifications. |
| gitforme/pages/Login.jsx | Removes the redundant, unstyled login page implementation. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
8
to
11
| import RepoPage from '../pages/gitpage'; | ||
| import ProtectedRoute from './components/ProtectedRoute'; | ||
| import DomainShiftBanner from './components/DomainShiftBanner'; | ||
| import { Analytics } from "@vercel/analytics/react" |
Comment on lines
+25
to
+27
| useEffect(() => { | ||
| if (error) toast.error(AUTH_ERRORS[error] || 'Please sign in to continue.'); | ||
| }, [error]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/loginrendered as bare unstyled text — no card, no button styling, just "Login to Your Account" as plain paragraph text.Cause
pages/Login.jsxstyled itself withform_containerandgithub-btn. Neither class exists insrc/index.css,src/App.css, or the Tailwind config — so nothing applied.The page was also redundant.
gitformeUi.jsxalready has a styled GitHub sign-in button pointing at the same${VITE_API_URL}/api/auth/githubendpoint.Change
Deleted the page.
/loginnow redirects to the landing page.The route itself is kept rather than removed, because two things still send users there:
AuthController.jsredirects to/login?error=auth_failedwhen OAuth failsaxiosConfig.jsredirects to/login?error=session_expiredon a 401Removing the route outright would have turned both into a 404, and redirecting unconditionally to GitHub OAuth would loop forever on a persistent auth failure. Instead the redirect reads
?error=and surfaces it through theToastContaineralready mounted inApp.jsx, so the reason a user got bounced still reaches them.Verification
npm run buildsucceeds — 2374 modules, no unresolved import left behind by the deletion.🤖 Generated with Claude Code