-
Notifications
You must be signed in to change notification settings - Fork 0
Create UserDropdownMenu.tsx #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]" /> |
Copilot
AI
Jun 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[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.
| <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> |
Copilot
AI
Jun 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description mentions a "Mis Eventos" option, but it’s missing here. Add a <DropdownMenuItem> linking to the events route.
| <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 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.