mirror of
https://github.com/Jellify-Music/App.git
synced 2026-01-14 06:49:40 -06:00
14 lines
516 B
TypeScript
14 lines
516 B
TypeScript
import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
import { UseQueryResult, useQuery } from "@tanstack/react-query";
|
|
import { AsyncStorageKeys } from "../../enums/async-storage-keys";
|
|
import { QueryKeys } from "../../enums/query-keys";
|
|
import { JellifyTrack } from "../../types/JellifyTrack";
|
|
|
|
|
|
export const useQueue: UseQueryResult<JellifyTrack[]> = useQuery({
|
|
queryKey: [QueryKeys.PlayQueue],
|
|
queryFn: (() => {
|
|
return AsyncStorage.getItem(AsyncStorageKeys.PlayQueue);
|
|
})
|
|
});
|