Skip to Content
Developer HubSDKData HooksuseSportsNavigation

useSportsNavigation

The useSportsNavigation hook is used for fetch lightweight sports data for navigation.

ℹ️

Hook represents a logic wrapper over TanStack Query’s useQuery hook. Explore TanStack Query docs  to understand what data the hook returns.

Usage

import { useSportsNavigation } from '@azuro-org/sdk' const { data, isFetching, error } = useSportsNavigation(props)

Props

{ filter?: { sportHub?: SportHub sportIds?: Array<string | number> } isLive?: boolean // if `true`, the hook will retrieve live navigation chainId?: ChainId query?: QueryParameter<NavigationSportData[]> // useQuery params }
type ChainId = | 100 // Gnosis | 137 // Polygon | 80002 // Polygon Amoy | 88888 // Chiliz | 88882 // Chiliz Spicy | 8453 // Base | 84532 // Base Sepolia enum SportHub { Sports = 'sports', Esports = 'esports', Unique = 'unique' }

Return Value

UseQueryResult<NavigationSportData[]>
import { type UseQueryResult } from '@tanstack/react-query' type NavigationSportData = { sportId: string slug: string name: string countries: Array<{ slug: string name: string leagues: Array<{ slug: string name: string activePrematchGamesCount: number activeLiveGamesCount: number }> }> }
Last updated on