feat(gif): add useGifAutocomplete orchestration hook

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
vineyardbovines
2026-04-14 14:16:05 -04:00
parent d5686e8117
commit ba1926b8b0
@@ -1,7 +1,7 @@
import {useRef, useState} from 'react'
import {useThrottledValue} from '#/components/hooks/useThrottledValue'
import {useKlipyAutocompleteQuery} from '#/state/queries/klipy'
import {useThrottledValue} from '#/components/hooks/useThrottledValue'
import {useAnalytics} from '#/analytics'
import {IS_WEB} from '#/env'
@@ -77,9 +77,7 @@ export function useGifAutocomplete({
return true
}
case 'ArrowUp': {
setActiveIndex(i =>
i <= 0 ? suggestions.length - 1 : i - 1,
)
setActiveIndex(i => (i <= 0 ? suggestions.length - 1 : i - 1))
return true
}
case 'Enter': {