@@ -19,6 +19,7 @@ import {
1919import { Separator } from '@/components/ui/separator' ;
2020import { SearchBox } from '@/components/SearchBox' ;
2121import { GitHubIcon } from '@/components/icons/GitHubIcon' ;
22+ import { SlackIcon } from '@/components/icons/SlackIcon' ;
2223import { useAuth } from '@/hooks/useAuth' ;
2324
2425const GITHUB_URL = 'https://github.com/CodeForPhilly' ;
@@ -192,12 +193,26 @@ const navLinkClass = ({ isActive }: { isActive: boolean }) =>
192193 isActive ? 'text-primary' : 'text-muted-foreground'
193194 } `;
194195
196+ function SlackLink ( ) {
197+ return (
198+ // A plain anchor: /chat is a server redirect the router can't resolve
199+ // (specs/screens/chat.md).
200+ < Button asChild variant = "ghost" size = "icon-sm" >
201+ < a
202+ href = "/chat"
203+ target = "_blank"
204+ rel = "noopener noreferrer"
205+ aria-label = "Join Code for Philly on Slack (opens in new tab)"
206+ >
207+ < SlackIcon />
208+ </ a >
209+ </ Button >
210+ ) ;
211+ }
212+
195213function GitHubLink ( ) {
196214 return (
197- // Desktop-only: between md and lg the header has no room for it (the
198- // utility cluster would push "Help Wanted" onto two lines); the mobile
199- // sheet carries its own GitHub row.
200- < Button asChild variant = "ghost" size = "icon-sm" className = "hidden lg:inline-flex" >
215+ < Button asChild variant = "ghost" size = "icon-sm" >
201216 < a
202217 href = { GITHUB_URL }
203218 target = "_blank"
@@ -245,7 +260,7 @@ export function AppHeader() {
245260 flex/gap spacing moves to the <ul>; the <li>s contribute none. */ }
246261 < nav
247262 aria-label = "Primary navigation"
248- className = "hidden md :block ml-4 flex-1"
263+ className = "hidden lg :block ml-4 flex-1"
249264 >
250265 < ul className = "flex items-center gap-2" >
251266 < li >
@@ -274,12 +289,13 @@ export function AppHeader() {
274289 </ ul >
275290 </ nav >
276291
277- { /* Desktop utility cluster: GitHub, search, auth, then the Volunteer
292+ { /* Desktop utility cluster: Slack, GitHub, search, auth, then the Volunteer
278293 CTA pinned rightmost (specs/behaviors/app-shell.md). */ }
279294 < nav
280295 aria-label = "Utility"
281- className = "hidden md :flex items-center gap-2 ml-auto"
296+ className = "hidden lg :flex items-center gap-2 ml-auto"
282297 >
298+ < SlackLink />
283299 < GitHubLink />
284300 < SearchBox />
285301 < AuthControls />
@@ -293,7 +309,7 @@ export function AppHeader() {
293309 </ nav >
294310
295311 { /* Mobile: auth + hamburger */ }
296- < div className = "flex md :hidden items-center gap-2 ml-auto" >
312+ < div className = "flex lg :hidden items-center gap-2 ml-auto" >
297313 < AuthControls />
298314 < Sheet open = { mobileOpen } onOpenChange = { setMobileOpen } >
299315 < SheetTrigger asChild >
@@ -392,6 +408,18 @@ export function AppHeader() {
392408 </ ul >
393409 < Separator />
394410 < ul className = "flex flex-col gap-2" >
411+ < li >
412+ < a
413+ href = "/chat"
414+ target = "_blank"
415+ rel = "noopener noreferrer"
416+ className = "block text-sm font-medium text-muted-foreground hover:text-primary"
417+ onClick = { ( ) => setMobileOpen ( false ) }
418+ >
419+ Slack
420+ < span className = "sr-only" > (opens in new tab)</ span >
421+ </ a >
422+ </ li >
395423 < li >
396424 < a
397425 href = { GITHUB_URL }
0 commit comments