1
0
Fork 0
forked from OpenNeo/impress

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:
Emi Matchu 2024-02-08 10:48:45 -08:00
parent 46dc4cf009
commit 355297d977

View file

@ -1,11 +1,11 @@
import { useQuery } from "@tanstack/react-query"; import { useQuery } from "@tanstack/react-query";
export function useAltStylesForSpecies(speciesId, options = {enabled = true}) { export function useAltStylesForSpecies(speciesId, options = {}) {
return useQuery({ return useQuery({
...options, ...options,
queryKey: ["altStylesForSpecies", String(speciesId)], queryKey: ["altStylesForSpecies", String(speciesId)],
queryFn: () => loadAltStylesForSpecies(speciesId), queryFn: () => loadAltStylesForSpecies(speciesId),
enabled: options.enabled && speciesId != null, enabled: (options.enabled ?? true) && speciesId != null,
}); });
} }