infra: add linting and formatting for js projects (#230)

* wip

* wip

* wip

* format

* wip(mobile): lint and format

* cleanup

* nits

* nits

* idiomatic react

* nit

* format all root files
This commit was merged in pull request #230.
This commit is contained in:
Arjun Patel
2026-06-02 07:44:24 -07:00
committed by GitHub
parent 2fe562ce2b
commit a8a0b7db1b
258 changed files with 7822 additions and 5195 deletions
+8 -9
View File
@@ -1,21 +1,20 @@
import { useQuery, useQueryClient } from "@tanstack/react-query";
import { useCallback } from "react";
import { apiClient } from "@/api/client";
import type { NetworkUsage } from "@/api/types";
import { useQuery, useQueryClient, skipToken } from '@tanstack/react-query';
import { useCallback } from 'react';
import { apiClient } from '@/api/client';
import type { NetworkUsage } from '@/api/types';
export const networkUsageQueryKey = (networkId: string | undefined) =>
["network-usage", networkId] as const;
['network-usage', networkId] as const;
export function useNetworkUsage(networkId: string | undefined) {
return useQuery({
queryKey: networkUsageQueryKey(networkId),
queryFn: () => apiClient.getNetworkUsage(networkId!),
enabled: !!networkId,
queryFn: networkId ? () => apiClient.getNetworkUsage(networkId) : skipToken,
// Refetch whenever a consumer mounts (billing settings, compose indicator)
// so users land on fresh quota state without listener wiring.
refetchOnMount: "always",
refetchOnMount: 'always',
refetchOnWindowFocus: true,
refetchInterval: 10000
refetchInterval: 10000,
});
}