mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-01 03:45:53 -05:00
16 lines
572 B
TypeScript
16 lines
572 B
TypeScript
import { useQuery } from '@tanstack/react-query';
|
|||
|
|
|
||
|
|
import { adminGetVersionInformationOptions } from '@/api/generated/@tanstack/react-query.gen';
|
||
|
|
import type { AdminGetVersionInformationResponse } from '@/api/generated';
|
||
|
|
|
||
|
|
export type AdminVersion = AdminGetVersionInformationResponse;
|
||
|
|
|
||
|
|
export const adminVersionQueryOptions = () => ({
|
||
|
|
...adminGetVersionInformationOptions(),
|
||
|
|
});
|
||
|
|
|
||
|
|
type AdminVersionQueryOptions = { enabled?: boolean };
|
||
|
|
|
||
|
|
export const useAdminVersion = (options?: AdminVersionQueryOptions) =>
|
||
|
|
useQuery({ ...adminVersionQueryOptions(), ...options });
|