fix hydration mismatch

This commit is contained in:
thesn10
2026-05-23 20:11:12 +02:00
parent 81bbbd7e57
commit 45d67bc4bc

View File

@@ -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"