update: gemini fixes
This commit is contained in:
13
hooks/useStreamingServices.ts
Normal file
13
hooks/useStreamingServices.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { getStreamingImages, StreamingServiceRaw } from "@/apis/streamingServiceApi";
|
||||
|
||||
export const useStreamingServices = () => {
|
||||
return useQuery({
|
||||
queryKey: ["streamingServices"],
|
||||
queryFn: async () => {
|
||||
const data: StreamingServiceRaw[] = await getStreamingImages();
|
||||
const mapped = Object.fromEntries(data.map((s) => [s.key, s.value]));
|
||||
return mapped;
|
||||
},
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user