From a6fcf16f8bc73b87d2f0cf8a92914c7c3d853dbd Mon Sep 17 00:00:00 2001 From: Kobe Date: Tue, 17 Dec 2024 09:58:29 +0100 Subject: [PATCH] fix: yield page loading state --- apps/marginfi-v2-trading/src/pages/yield.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/marginfi-v2-trading/src/pages/yield.tsx b/apps/marginfi-v2-trading/src/pages/yield.tsx index 81b89e6fe..4a7b82431 100644 --- a/apps/marginfi-v2-trading/src/pages/yield.tsx +++ b/apps/marginfi-v2-trading/src/pages/yield.tsx @@ -39,8 +39,8 @@ export const getStaticProps: GetStaticProps = async (context) }; export default function YieldPage({ initialData }: StaticArenaProps) { - const [initialized, sortBy, setSortBy, fetchArenaGroups, setHydrationComplete] = useTradeStoreV2((state) => [ - state.initialized, + const [poolsFetched, sortBy, setSortBy, fetchArenaGroups, setHydrationComplete] = useTradeStoreV2((state) => [ + state.poolsFetched, state.sortBy, state.setSortBy, state.fetchArenaGroups, @@ -145,8 +145,8 @@ export default function YieldPage({ initialData }: StaticArenaProps) { return ( <>
- {!initialized && } - {initialized && ( + {!poolsFetched && } + {poolsFetched && ( <>
- {initialized && previousTxn && ( + {poolsFetched && previousTxn && (