Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion web/src/hooks/useCoinPrice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ const fetchCoinPrices = async (...coinIds) => {
return data.coins;
};

export type Prices = {
[coinId: string]: { price: number };
};

export const useCoinPrice = (coinIds: string[]) => {
const isEnabled = coinIds !== undefined;

const { data: prices, isError } = useQuery({
const { data: prices, isError } = useQuery<Prices>({
queryKey: [`coinPrice${coinIds}`],
enabled: isEnabled,
queryFn: async () => fetchCoinPrices(coinIds),
Expand Down
273 changes: 0 additions & 273 deletions web/src/pages/Courts/CourtDetails/Stats.tsx

This file was deleted.

Loading
Loading