Skip to content

Commit

Permalink
fix: hydration error
Browse files Browse the repository at this point in the history
use correct ready state for loading GA
  • Loading branch information
borcherd authored and chambaz committed Oct 5, 2024
1 parent 2360a6e commit 118a10c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions apps/marginfi-v2-ui/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export default function MrgnApp({ Component, pageProps, path }: AppProps & MrgnA
extendedBankInfos,
nativeSolBalance,
accountSummary,
fetchMrgnlendState,
] = useMrgnlendStore((state) => [
state.initialized,
state.isRefreshingStore,
Expand All @@ -72,15 +71,14 @@ export default function MrgnApp({ Component, pageProps, path }: AppProps & MrgnA
state.extendedBankInfos,
state.nativeSolBalance,
state.accountSummary,
state.fetchMrgnlendState,
]);

const [isLstStoreInitialised, isRefreshingLstStore] = useLstStore((state) => [
state.initialized,
state.isRefreshingStore,
]);

const { query, isReady, asPath } = useRouter();
const { query, isReady } = useRouter();

// enable matomo heartbeat
React.useEffect(() => {
Expand Down Expand Up @@ -168,7 +166,7 @@ export default function MrgnApp({ Component, pageProps, path }: AppProps & MrgnA
</ConnectionProvider>
)}

{process.env.NEXT_PUBLIC_ANALYTICS === "true" && isReady && (
{process.env.NEXT_PUBLIC_ANALYTICS === "true" && ready && (
<>
<GoogleAnalytics gaId="G-0ZTQRWVG02" />
<SpeedInsights />
Expand Down

0 comments on commit 118a10c

Please sign in to comment.