fix hydration error
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
'use client'
|
||||
|
||||
import React from 'react'
|
||||
import { useState, useEffect } from 'react'
|
||||
import { WalletMultiButton } from '@solana/wallet-adapter-react-ui'
|
||||
|
||||
export function WalletButton() {
|
||||
const [mounted, setMounted] = useState(false)
|
||||
useEffect(() => setMounted(true), [])
|
||||
if (!mounted) return null
|
||||
|
||||
return (
|
||||
<WalletMultiButton
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user