mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-01 03:45:53 -05:00
14 lines
538 B
TypeScript
14 lines
538 B
TypeScript
import { useQuery } from '@tanstack/react-query';
|
|||
|
|
|
||
|
|
import { adminListLanguagesOptions } from '@/api/generated/@tanstack/react-query.gen';
|
||
|
|
import type { AdminListLanguagesResponse } from '@/api/generated';
|
||
|
|
|
||
|
|
export type AdminLanguages = AdminListLanguagesResponse;
|
||
|
|
|
||
|
|
export const adminLanguagesQueryOptions = () => adminListLanguagesOptions();
|
||
|
|
|
||
|
|
type AdminLanguagesQueryOptions = { enabled?: boolean };
|
||
|
|
|
||
|
|
export const useAdminLanguages = (options?: AdminLanguagesQueryOptions) =>
|
||
|
|
useQuery({ ...adminLanguagesQueryOptions(), ...options });
|