Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix hydration errors #242

Closed
wants to merge 2 commits into from
Closed

fix hydration errors #242

wants to merge 2 commits into from

Conversation

cctdaniel
Copy link
Contributor

@cctdaniel cctdaniel commented Sep 21, 2023

use dynamic import to solve hydration errors

@vercel
Copy link

vercel bot commented Sep 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 21, 2023 6:38am
staking-devnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 21, 2023 6:38am

@@ -1064,127 +1062,126 @@ const Staking: NextPage = () => {
))}
</Tab.List>
<Tab.Panels className="mt-4 sm:mt-11">
{isReady &&
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isReady was causing hydration error if wallet wasn't connected

@@ -42,7 +48,7 @@ const Header = () => {
</Link>
</div>
<div className="flex items-center justify-end space-x-2">
<WalletMultiButton className="primary-btn pt-0.5" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was causing hydration error when wallet is connected because client side and server side was returning different code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant