@@ -7,6 +7,7 @@ import Link from 'next/link';
77import { useParams , useRouter } from 'next/navigation' ;
88
99import { routes } from '~/constants/routes' ;
10+ import { useOrganizationId } from '~/hooks/useOrganizationId' ;
1011import { normalizeSportParam } from '~/utils/sport-route' ;
1112
1213type Props = {
@@ -21,6 +22,9 @@ export const Header = ({ arrow, center, menu }: Props) => {
2122 const sportType = normalizeSportParam ( params ?. sport ) ;
2223 const homeHref = sportType ? routes . home ( { sport : sportType } ) : routes . root ;
2324
25+ const { organizationId } = useOrganizationId ( ) ;
26+ const homeHrefWithQuery = { pathname : homeHref , query : { organizationId } } ;
27+
2428 return (
2529 < header className = "sticky top-0 z-header h-12 w-full shrink-0 border-b border-neutral-100 bg-white" >
2630 < div className = "row-between relative h-full w-full px-5" >
@@ -36,7 +40,7 @@ export const Header = ({ arrow, center, menu }: Props) => {
3640 </ button >
3741 < Link
3842 className = "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 truncate"
39- href = { homeHref }
43+ href = { homeHrefWithQuery }
4044 >
4145 < HCCLogo width = "71.5" height = "21" className = "text-[var(--color-primary-600)]" />
4246 </ Link >
@@ -45,7 +49,7 @@ export const Header = ({ arrow, center, menu }: Props) => {
4549 ) : (
4650 < >
4751 < div className = "center-y gap-4" >
48- < Link className = "flex items-end select-none" href = { homeHref } >
52+ < Link className = "flex items-end select-none" href = { homeHrefWithQuery } >
4953 < HCCLogo width = "71.5" height = "21" className = "text-[var(--color-primary-600)]" />
5054 </ Link >
5155 { center }
0 commit comments