Commit 7811f748 by archer

fix: 账单第一页不展示

parent 9c8ca7dd
import { useState, useCallback } from 'react';
import { useState, useCallback, useEffect } from 'react';
import type { PagingData } from '../types/index';
import { useQuery } from '@tanstack/react-query';
import { useToast } from './useToast';
export const usePaging = <T = any>({
......@@ -64,7 +63,9 @@ export const usePaging = <T = any>({
getData(pageNum + 1);
}, [getData, isLoadAll, pageNum, requesting]);
useQuery(['init'], () => getData(1, true));
useEffect(() => {
getData(1, true);
}, []);
return {
pageNum,
......
......@@ -10,21 +10,12 @@ import {
Button,
Input,
Box,
Grid,
Table,
Thead,
Tbody,
Tr,
Th,
Td,
TableContainer
Grid
} from '@chakra-ui/react';
import { getPayCode, checkPayResult } from '@/api/user';
import { useToast } from '@/hooks/useToast';
import { useQuery } from '@tanstack/react-query';
import { useRouter } from 'next/router';
import { modelList } from '@/constants/model';
import { formatPrice } from '../../../utils/user';
const PayModal = ({ onClose }: { onClose: () => void }) => {
const router = useRouter();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment