@@ -50,10 +50,10 @@ export default function Home({ pageProps }: Props) {
50
50
React . useEffect ( ( ) => {
51
51
async function loadLeaderboard ( ) {
52
52
try {
53
- const newLeaderboard = await getRequest < LeaderBoardList > (
54
- pageProps . tenantConfig . id ,
55
- `/app/leaderboard/${ pageProps . tenantConfig . id } `
56
- ) ;
53
+ const newLeaderboard = await getRequest < LeaderBoardList > ( {
54
+ tenant : pageProps . tenantConfig . id ,
55
+ url : `/app/leaderboard/${ pageProps . tenantConfig . id } ` ,
56
+ } ) ;
57
57
setLeaderboard ( newLeaderboard ) ;
58
58
} catch ( err ) {
59
59
setErrors ( handleError ( err as APIError ) ) ;
@@ -69,10 +69,10 @@ export default function Home({ pageProps }: Props) {
69
69
React . useEffect ( ( ) => {
70
70
async function loadTenantScore ( ) {
71
71
try {
72
- const newTenantScore = await getRequest < TenantScore > (
73
- pageProps . tenantConfig . id ,
74
- `/app/tenantScore/${ pageProps . tenantConfig . id } `
75
- ) ;
72
+ const newTenantScore = await getRequest < TenantScore > ( {
73
+ tenant : pageProps . tenantConfig . id ,
74
+ url : `/app/tenantScore/${ pageProps . tenantConfig . id } ` ,
75
+ } ) ;
76
76
setTenantScore ( newTenantScore ) ;
77
77
} catch ( err ) {
78
78
setErrors ( handleError ( err as APIError ) ) ;
@@ -88,10 +88,10 @@ export default function Home({ pageProps }: Props) {
88
88
React . useEffect ( ( ) => {
89
89
async function loadTreesDonated ( ) {
90
90
try {
91
- const newTreesDonated = await getRequest < TreesDonated > (
92
- pageProps . tenantConfig . id ,
93
- `${ process . env . WEBHOOK_URL } /platform/total-tree-count`
94
- ) ;
91
+ const newTreesDonated = await getRequest < TreesDonated > ( {
92
+ tenant : pageProps . tenantConfig . id ,
93
+ url : `${ process . env . WEBHOOK_URL } /platform/total-tree-count` ,
94
+ } ) ;
95
95
setTreesDonated ( newTreesDonated ) ;
96
96
} catch ( err ) {
97
97
setErrors ( handleError ( err as APIError ) ) ;
0 commit comments