Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new UserDropdownMenu component that displays a user’s avatar and account-related options in a dropdown menu when authenticated.
- Adds a
UserDropdownMenucomponent with profile and logout options - Applies custom styles for trigger and menu items
- Relies on a
userprop for rendering user data
Comments suppressed due to low confidence (2)
components/UserDropdownMenu.tsx:16
- The component signature expects a
userprop but the description referencesuseAuth0. Align the documentation or implement the hook internally.
export function UserDropdownMenu({ user }: UserDropdownMenuProps) {
components/UserDropdownMenu.tsx:1
- This new component currently has no associated tests. Consider adding unit or integration tests to cover rendering and menu interactions.
import {
components/UserDropdownMenu.tsx
Outdated
| isUserDataAvailable && ( | ||
| <DropdownMenu> | ||
| <DropdownMenuTrigger className="!border-none !active:!border-none focus:!border-none"> | ||
| <img src={user.picture} alt={user.name} className="size-10 rounded-full border-[#265F1A]" /> |
There was a problem hiding this comment.
[nitpick] The size-10 utility is not a standard Tailwind class. Use explicit h-10 w-10 (or your design system’s equivalent) for consistent sizing.
Suggested change
| <img src={user.picture} alt={user.name} className="size-10 rounded-full border-[#265F1A]" /> | |
| <img src={user.picture} alt={user.name} className="h-10 w-10 rounded-full border-[#265F1A]" /> |
| <DropdownMenuContent className="z-[9999] [&_*]:!text-md [&_*]:!text-gray-800 [&_*:hover]:!text-emerald-500"> | ||
| <DropdownMenuLabel>Mi Cuenta</DropdownMenuLabel> | ||
| <DropdownMenuSeparator /> | ||
| <DropdownMenuItem><Link to="/perfil">Mi Perfil</Link></DropdownMenuItem> |
There was a problem hiding this comment.
The PR description mentions a "Mis Eventos" option, but it’s missing here. Add a <DropdownMenuItem> linking to the events route.
Suggested change
| <DropdownMenuItem><Link to="/perfil">Mi Perfil</Link></DropdownMenuItem> | |
| <DropdownMenuItem><Link to="/perfil">Mi Perfil</Link></DropdownMenuItem> | |
| <DropdownMenuItem><Link to="/eventos">Mis Eventos</Link></DropdownMenuItem> |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
"You’ve applied a border color but no border width, so it won’t render. Add a border width class like border-2" Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
This pull request introduces a new
UserDropdownMenucomponent in thecomponents/UserDropdownMenu.tsxfile. The component provides a dropdown menu for authenticated users, displaying account-related options such as viewing their profile, accessing their events, and logging out.New
UserDropdownMenuComponent:useAuth0hook to fetch user authentication status and data (user,isAuthenticated,isLoading).DropdownMenucomponents, with options for "Mi Perfil," "Mis Eventos," and a logout button.