()
| 17 | * (user is still authed), so the auth memo stays correct without re-eval. |
| 18 | */ |
| 19 | export function useVoiceEnabled(): boolean { |
| 20 | const userIntent = useAppState(s => s.settings.voiceEnabled === true) |
| 21 | const authVersion = useAppState(s => s.authVersion) |
| 22 | // eslint-disable-next-line react-hooks/exhaustive-deps |
| 23 | const authed = useMemo(hasVoiceAuth, [authVersion]) |
| 24 | return userIntent && authed && isVoiceGrowthBookEnabled() |
| 25 | } |
| 26 |
no test coverage detected