Skip to content

Commit f39ef4a

Browse files
authored
Merge pull request #1826 from kleros/refactor/court-stats
refactor(web): courts-stat
2 parents 0c67dfa + 743b960 commit f39ef4a

File tree

6 files changed

+323
-275
lines changed

6 files changed

+323
-275
lines changed

web/src/hooks/useCoinPrice.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ const fetchCoinPrices = async (...coinIds) => {
66
return data.coins;
77
};
88

9+
export type Prices = {
10+
[coinId: string]: { price: number };
11+
};
12+
913
export const useCoinPrice = (coinIds: string[]) => {
1014
const isEnabled = coinIds !== undefined;
1115

12-
const { data: prices, isError } = useQuery({
16+
const { data: prices, isError } = useQuery<Prices>({
1317
queryKey: [`coinPrice${coinIds}`],
1418
enabled: isEnabled,
1519
queryFn: async () => fetchCoinPrices(coinIds),

web/src/pages/Courts/CourtDetails/Stats.tsx

Lines changed: 0 additions & 273 deletions
This file was deleted.

0 commit comments

Comments
 (0)