Skip to content

Commit 571b5e9

Browse files
authored
use fallbackData option to display pre-fetched execs before loading more (#402)
1 parent 3915059 commit 571b5e9

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pages/executive.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,7 @@ export const ExecutiveOverview = ({ proposals }: { proposals?: Proposal[] }): JS
130130
revalidateOnFocus: false,
131131
initialSize: 1,
132132
revalidateFirstPage: false,
133-
fallback: {
134-
[`/api/executive?network=${network}&start=0&limit=10&sortBy=${sortBy}`]: proposals
135-
}
133+
fallbackData: proposals
136134
});
137135

138136
const isLoadingInitialData = !paginatedProposals && !error;
@@ -379,9 +377,6 @@ export const ExecutiveOverview = ({ proposals }: { proposals?: Proposal[] }): JS
379377
<Box my={3}>
380378
<SkeletonThemed width={'100%'} height={'200px'} />
381379
</Box>
382-
<Box my={3}>
383-
<SkeletonThemed width={'100%'} height={'200px'} />
384-
</Box>
385380
</Box>
386381
)}
387382
{!showHistorical && flattenedProposals.filter(proposal => proposal.active).length > 0 && (

0 commit comments

Comments
 (0)