feat: add auth system, boss pokemon details, moves/abilities API, and run ownership
Add user authentication with login/signup/protected routes, boss pokemon detail fields and result team tracking, moves and abilities selector components and API, run ownership and visibility controls, and various UI improvements across encounters, run list, and journal pages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
20
frontend/src/hooks/useMoves.ts
Normal file
20
frontend/src/hooks/useMoves.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import { searchMoves, searchAbilities } from '../api/moves'
|
||||
|
||||
export function useSearchMoves(search: string, limit = 20) {
|
||||
return useQuery({
|
||||
queryKey: ['moves', 'search', search, limit],
|
||||
queryFn: () => searchMoves(search, limit),
|
||||
enabled: search.length > 0,
|
||||
staleTime: 60_000,
|
||||
})
|
||||
}
|
||||
|
||||
export function useSearchAbilities(search: string, limit = 20) {
|
||||
return useQuery({
|
||||
queryKey: ['abilities', 'search', search, limit],
|
||||
queryFn: () => searchAbilities(search, limit),
|
||||
enabled: search.length > 0,
|
||||
staleTime: 60_000,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user