mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add device deletion support
This commit is contained in:
parent
538c0b64ff
commit
e10aef9933
8 changed files with 286 additions and 120 deletions
|
@ -6,6 +6,8 @@ import { useQuery } from '@tanstack/react-query';
|
|||
|
||||
import { useApi } from 'hooks/useApi';
|
||||
|
||||
export const QUERY_KEY = 'Devices';
|
||||
|
||||
const fetchDevices = async (
|
||||
api?: Api,
|
||||
requestParams?: DevicesApiGetDevicesRequest,
|
||||
|
@ -28,7 +30,7 @@ export const useDevices = (
|
|||
) => {
|
||||
const { api } = useApi();
|
||||
return useQuery({
|
||||
queryKey: ['Devices', requestParams],
|
||||
queryKey: [QUERY_KEY, requestParams],
|
||||
queryFn: ({ signal }) =>
|
||||
fetchDevices(api, requestParams, { signal }),
|
||||
enabled: !!api
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue