forked from VinokurovVE/tests
Update
This commit is contained in:
@ -184,12 +184,12 @@ export function useBoilers(limit?: number, page?: number, search?: string) {
|
||||
|
||||
// Servers
|
||||
|
||||
export function useServers(region_id?: number, offset?: number, limit?: number) {
|
||||
export function useServers(region_id?: number | null, offset?: number, limit?: number) {
|
||||
const { data, error, isLoading } = useSWR(
|
||||
region_id ? `/api/servers?region_id=${region_id}&offset=${offset || 0}&limit=${limit || 10}` : `/api/servers?offset=${offset || 0}&limit=${limit || 10}`,
|
||||
(url: string) => fetcher(url, BASE_URL.servers),
|
||||
{
|
||||
revalidateOnFocus: false
|
||||
revalidateOnFocus: false,
|
||||
}
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user