Skip to content

Commit 74ac763

Browse files
committed
[Issue #8499] Show opportunity count above single-agency label on Opportunities page
1 parent 8d74b82 commit 74ac763

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

frontend/src/app/[locale]/(base)/opportunities/page.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ describe("Opportunities", () => {
205205
expect(await screen.findByText("Test Opportunity")).toBeVisible();
206206
});
207207

208-
it("renders agency name label instead of opportunity count", async () => {
208+
it("renders both opportunity count and agency label", async () => {
209209
mockSearchForOpportunities.mockResolvedValue({
210210
data: [basicOpportunity],
211211
});
@@ -215,6 +215,7 @@ describe("Opportunities", () => {
215215
});
216216
render(component);
217217

218+
expect(await screen.findByText("numOpportunities")).toBeVisible();
218219
expect(await screen.findByText("showingOpportunitiesFor")).toBeVisible();
219220
});
220221

frontend/src/app/[locale]/(base)/opportunities/page.tsx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,20 @@ const OpportunitiesTable = ({
132132

133133
return (
134134
<div>
135-
<span className="font-sans-lg text-bold">
136-
{isSingleAgency
137-
? t("showingOpportunitiesFor", { agencyName })
138-
: t("numOpportunities", { num: userOpportunities.length })}
139-
</span>
135+
{isSingleAgency ? (
136+
<div className="margin-bottom-2">
137+
<div className="font-sans-lg text-bold margin-bottom-2">
138+
{t("numOpportunities", { num: userOpportunities.length })}
139+
</div>
140+
<div className="font-sans-lg text-bold">
141+
{t("showingOpportunitiesFor", { agencyName })}
142+
</div>
143+
</div>
144+
) : (
145+
<span className="font-sans-lg text-bold">
146+
{t("numOpportunities", { num: userOpportunities.length })}
147+
</span>
148+
)}
140149

141150
<TableWithResponsiveHeader
142151
headerContent={headerTitles}

0 commit comments

Comments
 (0)