Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the login functionality by simplifying authentication paths and consolidating login logic into the LoginForm component.
- Shortened authentication paths from
/authentication/default/*to/auth/* - Moved authentication logic directly into LoginForm component, removing unnecessary prop drilling
- Updated sign-out flow to use authClient and redirect to the new login path
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/client/src/routes/paths.ts | Simplified auth paths by removing /default segment from login, signup, and forgot-password routes |
| apps/client/src/layouts/main-layout/common/ProfileMenu.tsx | Updated sign-out handler to use authClient.signOut() and redirect to the new auth path structure |
| apps/client/src/components/sections/authentications/default/LoginForm.tsx | Consolidated login logic into the component by removing handleLogin prop and calling authClient.signIn.email directly; added loadingPosition prop to submit button |
| apps/client/src/app/auth/login/page.tsx | Simplified page component by removing local state and login handler, now using authPaths instead of paths |
Comments suppressed due to low confidence (1)
apps/client/src/layouts/main-layout/common/ProfileMenu.tsx:102
- Avoid automated semicolon insertion (92% of all statements in the enclosing function have an explicit semicolon).
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const handleSignout = async () => { | ||
| await authClient.signOut(); | ||
| router.push(authPaths.login); | ||
| } |
There was a problem hiding this comment.
Missing semicolon at the end of the function declaration. JavaScript/TypeScript best practices recommend using semicolons consistently throughout the codebase.
Suggested change
| } | |
| }; |
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.
Summary
Changes
How to test
Screenshots (if UI)
Checklist