diff --git a/app/(main)/league/[leagueId]/entry/[entryId]/week/Week.test.tsx b/app/(main)/league/[leagueId]/entry/[entryId]/week/Week.test.tsx index 78b69c1d..516631f6 100644 --- a/app/(main)/league/[leagueId]/entry/[entryId]/week/Week.test.tsx +++ b/app/(main)/league/[leagueId]/entry/[entryId]/week/Week.test.tsx @@ -186,6 +186,8 @@ describe('League Week Picks', () => { // Wait for the main content to be displayed await waitFor(() => { expect(screen.getByTestId('weekly-picks')).toBeInTheDocument(); + expect(screen.getByTestId('week__week-number')).toHaveTextContent('Week 1'); + expect(screen.getByTestId('week__entry-name')).toHaveTextContent('Entry 1'); }); expect(screen.queryByTestId('global-spinner')).not.toBeInTheDocument(); diff --git a/app/(main)/league/[leagueId]/entry/[entryId]/week/Week.tsx b/app/(main)/league/[leagueId]/entry/[entryId]/week/Week.tsx index cfbbf965..6edab010 100644 --- a/app/(main)/league/[leagueId]/entry/[entryId]/week/Week.tsx +++ b/app/(main)/league/[leagueId]/entry/[entryId]/week/Week.tsx @@ -34,6 +34,7 @@ import Image from 'next/image'; import { useRouter } from 'next/navigation'; import LinkCustom from '@/components/LinkCustom/LinkCustom'; import { ChevronLeft } from 'lucide-react'; +import Heading from '@/components/Heading/Heading'; /** * Renders the weekly picks page. @@ -43,6 +44,7 @@ import { ChevronLeft } from 'lucide-react'; // eslint-disable-next-line no-unused-vars const Week = ({ entry, league, NFLTeams, week }: IWeekProps): JSX.Element => { const [pickHistory, setPickHistory] = useState([]); + const [entryName, setEntryName] = useState(''); const [error, setError] = useState(null); const [schedule, setSchedule] = useState([]); const [selectedLeague, setSelectedLeague] = useState(); @@ -156,7 +158,8 @@ const Week = ({ entry, league, NFLTeams, week }: IWeekProps): JSX.Element => { if (!currentEntry) { throw new Error('Entry not found'); } - + + setEntryName(currentEntry.name); let entryHistory = currentEntry?.selectedTeams || []; if (currentEntry?.selectedTeams.length > 0) { @@ -271,10 +274,18 @@ const Week = ({ entry, league, NFLTeams, week }: IWeekProps): JSX.Element => { className="flex flex-col items-center w-full pt-8" data-testid="weekly-picks" > -

- Week {week} pick -

- + {`Week ${week} pick`} + + {entryName} + {pickHistory.length > 0 && (