Skip to content

Commit 1b08a98

Browse files
committed
fix: limit
1 parent 3034a2e commit 1b08a98

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pages/api/SGhoService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import {
88
TransformedDailyData,
99
} from './SGhoService.types';
1010

11-
const sghoConfig = {
11+
export const sghoConfig = {
1212
graphqlEndpoint: 'https://tokenlogic-data.ddn.hasura.app/graphql',
1313
apiKey: process.env.TOKENLOGIC_API_KEY,
14-
defaultLimit: 100,
14+
defaultLimit: 1000,
1515
} as const;
1616

1717
/**

src/hooks/useSGhoApyHistory.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { sghoConfig } from 'pages/api/SGhoService';
12
import { useCallback, useEffect, useMemo, useState } from 'react';
23
import { MeritApyDataItem } from 'src/modules/reserve-overview/graphs/MeritApyGraph';
34

@@ -38,7 +39,7 @@ export const useSGhoApyHistory = (
3839
// Stabilize the options to prevent unnecessary re-fetches
3940
const stableOptions = useMemo(() => options, [options.limit, options.startDate, options.endDate]);
4041

41-
const { limit = 100, startDate, endDate } = stableOptions;
42+
const { limit = sghoConfig.defaultLimit, startDate, endDate } = stableOptions;
4243

4344
const fetchData = useCallback(async () => {
4445
try {

0 commit comments

Comments
 (0)