import { useQuery } from '@tanstack/react-query';
import { miningApi } from '../api/mining.api';

export function useMiningStatus() {
  return useQuery({
    queryKey: ['mining', 'status'],
    queryFn: () => miningApi.getMiningStatus(),
    refetchInterval: 60000, // 每60秒刷新
    staleTime: 30000,       // 30秒内数据视为新鲜
  });
}
