@elastic-suite/gally-admin-components
Version:
Components package for gally admin BO
18 lines (15 loc) • 442 B
text/typescript
import { selectBundles, useAppSelector } from '../store'
import { useMemo } from 'react'
import {
isSearchUsageEnabled,
premiumHomePageUrl,
standardHomePageUrl,
} from '@elastic-suite/gally-admin-shared'
export function useHomePageUrl(): string {
const bundles = useAppSelector(selectBundles)
return useMemo(() => {
return isSearchUsageEnabled(bundles)
? premiumHomePageUrl
: standardHomePageUrl
}, [bundles])
}