fix hydration mismatch
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
'use client'
|
||||
|
||||
import { useState } from 'react'
|
||||
import { useState, useEffect } from 'react'
|
||||
import { YStack, XStack, Text, Button, Spinner, Separator } from 'tamagui'
|
||||
import { WalletButton } from '@/components/WalletButton'
|
||||
import { CreateEscrowForm } from '@/components/CreateEscrowForm'
|
||||
@@ -17,6 +17,8 @@ export default function PlaygroundPage() {
|
||||
const { escrows, loading, error, refresh } = useEscrows()
|
||||
const [selected, setSelected] = useState<EscrowAccountWithPda | null>(null)
|
||||
const [showResolvers, setShowResolvers] = useState(false)
|
||||
const [mounted, setMounted] = useState(false)
|
||||
useEffect(() => { setMounted(true) }, [])
|
||||
|
||||
return (
|
||||
<YStack flex={1} minHeight="100vh" backgroundColor="$background">
|
||||
@@ -59,7 +61,7 @@ export default function PlaygroundPage() {
|
||||
</select>
|
||||
</XStack>
|
||||
|
||||
{isDevnet && (
|
||||
{mounted && isDevnet && (
|
||||
<a
|
||||
href="https://faucet.solana.com/"
|
||||
target="_blank"
|
||||
|
||||
Reference in New Issue
Block a user