Oops, I missed a syntax error lol
I thought this refactor of this change was working, but actually it was
just failing to build the JS lmao. Here's a version with correct syntax!
😅
Is there a syntax for this kind of thing that I'm just forgetting? Idk,
oh well!
This commit is contained in:
parent
46dc4cf009
commit
355297d977
1 changed files with 2 additions and 2 deletions
|
@ -1,11 +1,11 @@
|
|||
import { useQuery } from "@tanstack/react-query";
|
||||
|
||||
export function useAltStylesForSpecies(speciesId, options = {enabled = true}) {
|
||||
export function useAltStylesForSpecies(speciesId, options = {}) {
|
||||
return useQuery({
|
||||
...options,
|
||||
queryKey: ["altStylesForSpecies", String(speciesId)],
|
||||
queryFn: () => loadAltStylesForSpecies(speciesId),
|
||||
enabled: options.enabled && speciesId != null,
|
||||
enabled: (options.enabled ?? true) && speciesId != null,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue