Skip to content

Commit

Permalink
Merge pull request #11 from yamitzky/fix/userinfo
Browse files Browse the repository at this point in the history
fix: UserInfoMenu menu does not work
  • Loading branch information
yamitzky authored Feb 12, 2025
2 parents cf269db + 9129f0d commit 646db13
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions apps/web/app/components/Settings.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export const Default: Story = {
name: 'Test User',
},
reminders: [
{ id: '1', minutes: 5, type: 'webhook' },
{ id: '2', minutes: 30, type: 'webhook' },
{ id: '1', minutesBefore: 5, notificationType: 'webhook' },
{ id: '2', minutesBefore: 30, notificationType: 'webhook' },
],
},
}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/app/components/UserInfo.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ describe('UserInfo', () => {
const user = {
email: '[email protected]',
}
const { container } = render(<UserInfoMenu user={user} className="custom-class" />)
expect(container.firstChild).toHaveClass('custom-class')
render(<UserInfoMenu user={user} className="custom-class" />)
expect(screen.getByRole('button')).toHaveClass('custom-class')
})

it('should set correct Gravatar URL based on email hash', async () => {
Expand Down
4 changes: 3 additions & 1 deletion apps/web/app/components/UserInfoMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export function UserInfoMenu({ user, onClickShowMyEvents, className }: Props) {
return (
<Dropdown>
<DropdownTrigger>
<UserInfo user={user} className={className} as="button" />
<div>
<UserInfo user={user} className={className} as="button" />
</div>
</DropdownTrigger>
<DropdownMenu aria-label="User actions">
<DropdownItem key="setting" href="/settings">
Expand Down

0 comments on commit 646db13

Please sign in to comment.