From 80e9a8decbd3b3be0e2c250ec1ede69fd7b99875 Mon Sep 17 00:00:00 2001 From: Mary Kate Fain Date: Thu, 18 Sep 2025 11:48:02 -0500 Subject: [PATCH] add help center link to user menu --- src/components/auth/AccountSwitcher.test.tsx | 2 ++ src/components/auth/AccountSwitcher.tsx | 9 ++++++++- src/components/auth/LoginArea.test.tsx | 2 ++ src/components/auth/LoginArea.tsx | 9 ++++++++- 4 files changed, 20 insertions(+), 2 deletions(-) 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)}