'use client'; import { Icon, Row } from '@umami/react-zen'; import { useNavigation } from '@/components/hooks'; import { Slash } from '@/components/icons'; import { BoardSelect } from '@/components/input/BoardSelect'; import { LinkSelect } from '@/components/input/LinkSelect'; import { PixelSelect } from '@/components/input/PixelSelect'; import { TeamsButton } from '@/components/input/TeamsButton'; import { WebsiteSelect } from '@/components/input/WebsiteSelect'; export function TopNav() { const { websiteId, linkId, pixelId, boardId, teamId, router, renderUrl } = useNavigation(); const handleWebsiteChange = (value: string) => { router.push(renderUrl(`/websites/${value}`)); }; const handleLinkChange = (value: string) => { router.push(renderUrl(`/links/${value}`)); }; const handlePixelChange = (value: string) => { router.push(renderUrl(`/pixels/${value}`)); }; const handleBoardChange = (value: string) => { router.push(renderUrl(`/boards/${value}`)); }; return ( {(websiteId || linkId || pixelId || boardId) && ( <> {websiteId && ( )} {linkId && ( )} {pixelId && ( )} {boardId && ( )} )}
); }