diff --git a/src/components/auth/AccountSwitcher.test.tsx b/src/components/auth/AccountSwitcher.test.tsx index 7337104c..e503b526 100644 --- a/src/components/auth/AccountSwitcher.test.tsx +++ b/src/components/auth/AccountSwitcher.test.tsx @@ -45,6 +45,8 @@ describe('AccountSwitcher', () => { expect(screen.getByRole('button')).toBeInTheDocument(); }); + + it('returns null when no current user', () => { mockUseLoggedInAccounts.mockReturnValue({ authors: [], diff --git a/src/components/auth/AccountSwitcher.tsx b/src/components/auth/AccountSwitcher.tsx index 1b8c3a37..3a5b9901 100644 --- a/src/components/auth/AccountSwitcher.tsx +++ b/src/components/auth/AccountSwitcher.tsx @@ -1,7 +1,7 @@ // NOTE: This file is stable and usually should not be modified. // It is important that all functionality in this file is preserved, and should only be modified if explicitly requested. -import { ChevronDown, LogOut, UserIcon, UserPlus, Settings } from 'lucide-react'; +import { ChevronDown, LogOut, UserIcon, UserPlus, Settings, HelpCircle } from 'lucide-react'; import { DropdownMenu, DropdownMenuContent, @@ -72,6 +72,13 @@ export function AccountSwitcher({ onAddAccountClick }: AccountSwitcherProps) { Settings + window.open('https://soapbox.pub/shakespeare-resources/', '_blank')} + className='flex items-center gap-2 cursor-pointer p-2 rounded-md' + > + + Help + { expect(screen.getByRole('button')).toBeInTheDocument(); }); + + it('maintains consistent layout structure whether logged in or not', () => { // Test logged out state mockUseLoggedInAccounts.mockReturnValue({ diff --git a/src/components/auth/LoginArea.tsx b/src/components/auth/LoginArea.tsx index eb80d603..e13d2d45 100644 --- a/src/components/auth/LoginArea.tsx +++ b/src/components/auth/LoginArea.tsx @@ -2,7 +2,7 @@ // It is important that all functionality in this file is preserved, and should only be modified if explicitly requested. import { useState } from 'react'; -import { User, UserPlus, ChevronDown, Settings } from 'lucide-react'; +import { User, UserPlus, ChevronDown, Settings, HelpCircle } from 'lucide-react'; import { DropdownMenu, DropdownMenuContent, @@ -64,6 +64,13 @@ export function LoginArea({ className }: LoginAreaProps) { Settings + window.open('https://soapbox.pub/shakespeare-resources/', '_blank')} + className='flex items-center gap-2 cursor-pointer p-2 rounded-md' + > + + Help + setLoginDialogOpen(true)}