import { Box, Loader2, LogOut, RefreshCw } from 'lucide-react' import { Badge, Button } from 'ui' import { Admonition } from 'ui-patterns' import { ButtonTooltip } from '@/components/ui/ButtonTooltip' import { usePostgresSandbox } from '@/state/postgres-sandbox/sandbox' export const SandboxManagement = () => { const { status, error, isSyncing, startSandbox, destroySandbox, syncSandbox } = usePostgresSandbox() if (status === 'idle') { return ( startSandbox()}> Set up sandbox , ]} >

Set up sandbox for testing

Recommended

Ensure that queries do not affect your actual database

) } if (status === 'loading') { return (

Setting up sandbox

) } if (status === 'error') { return ( startSandbox()}> Retry set up , ]} /> ) } return ( } className="w-7" disabled={isSyncing} tooltip={{ content: { side: 'bottom', text: 'Exit sandbox' } }} onClick={() => destroySandbox()} />, } className="w-7" loading={isSyncing} tooltip={{ content: { side: 'bottom', text: 'Refresh schema' } }} onClick={() => syncSandbox()} />, ]} >

Sandbox active

Your database is never modified

) }