Skip to content

Commit c88e704

Browse files
authored
Merge pull request #753 from Nickatak/feat/navbar-trim-org-links
feat: Drop How to Join / Projects from the header nav
2 parents 46fa740 + 9e7f062 commit c88e704

2 files changed

Lines changed: 48 additions & 7 deletions

File tree

frontend/src/shared/components/nav/HeaderNav.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/**
22
* Top-of-page navigation header for the `(with-nav)` route group.
33
*
4-
* Renders the CTJ logo (linking home), three external links to
5-
* Hack for LA org pages, an auth control on the right, and a mobile
6-
* hamburger menu trigger. The `(auth)` route group uses a different
7-
* `AuthNav` component.
4+
* Renders the CTJ logo (linking home), a single external link to
5+
* the Hack for LA org site, an auth control on the right, and a
6+
* mobile hamburger menu trigger. The `(auth)` route group uses a
7+
* different `AuthNav` component.
88
*
99
* Auth control: there is no Figma frame for the signed-in nav state
1010
* - the original app had no auth UI at all. Until a design exists,
@@ -39,10 +39,13 @@ interface MenuObject {
3939
link: string;
4040
}
4141

42+
// "How to Join" and "Projects" were dropped per the 2026-05-14 nav
43+
// decision; "View Opportunities" is the intended replacement but is
44+
// blocked on its destination (internal route vs hackforla.org), so
45+
// it lands in a follow-up. Kept as an array since that follow-up
46+
// re-adds an entry.
4247
const menuItems: MenuObject[] = [
4348
{ name: "Hack for LA", link: "https://www.hackforla.org/" },
44-
{ name: "How to Join", link: "https://www.hackforla.org/getting-started" },
45-
{ name: "Projects", link: "https://www.hackforla.org/projects/" },
4649
];
4750

4851
function Logo() {

frontend/tests/components/HeaderNav.test.tsx

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/**
2-
* Tests for `HeaderNav`'s auth-state-dependent auth control.
2+
* Tests for `HeaderNav`'s auth-state-dependent auth control and its
3+
* external-link list.
34
*
45
* `HeaderNav` is tested in isolation against a mocked `useAuth`; the
56
* provider's bootstrap (csrf + me round-trips) is exercised in
@@ -56,3 +57,40 @@ describe("HeaderNav auth control", () => {
5657
expect(mockLogout).toHaveBeenCalledTimes(1);
5758
});
5859
});
60+
61+
describe("HeaderNav structure", () => {
62+
beforeEach(() => {
63+
mockAuth = { user: null, loading: false, logout: mockLogout };
64+
});
65+
66+
/** The logo renders and links home (SVG is aria-hidden; the link
67+
* carries the accessible name). */
68+
test("renders the logo linking home", () => {
69+
render(<HeaderNav />);
70+
expect(
71+
screen.getByRole("link", { name: "Civic Tech Jobs - Home" }),
72+
).toHaveAttribute("href", "/");
73+
});
74+
});
75+
76+
describe("HeaderNav external links", () => {
77+
beforeEach(() => {
78+
mockAuth = { user: null, loading: false, logout: mockLogout };
79+
});
80+
81+
/** Only the "Hack for LA" org link remains after the 2026-05-14 trim. */
82+
test("renders the Hack for LA link", () => {
83+
render(<HeaderNav />);
84+
expect(screen.getByText("Hack for LA").closest("a")).toHaveAttribute(
85+
"href",
86+
"https://www.hackforla.org/",
87+
);
88+
});
89+
90+
/** "How to Join" and "Projects" were dropped; guard against regression. */
91+
test("does not render the dropped How to Join / Projects links", () => {
92+
render(<HeaderNav />);
93+
expect(screen.queryByText("How to Join")).not.toBeInTheDocument();
94+
expect(screen.queryByText("Projects")).not.toBeInTheDocument();
95+
});
96+
});

0 commit comments

Comments
 (0)