mirror of
https://github.com/Jellify-Music/App.git
synced 2026-02-11 04:58:30 -06:00
8 lines
283 B
TypeScript
8 lines
283 B
TypeScript
import { useQuery } from "@tanstack/react-query";
|
|
import { QueryKeys } from "../../enums/query-keys";
|
|
import { fetchItem } from "./functions/item";
|
|
|
|
export const useItem = (itemId: string) => useQuery({
|
|
queryKey: [QueryKeys.Item, itemId],
|
|
queryFn: () => fetchItem(itemId)
|
|
}); |