import React, { useEffect } from 'react' import { Box, Text } from 'ink' import { Header, KeyValue } from '../components/index.js' import { theme } from '../theme.js' export interface SafeOpenSuccessScreenProps { /** * Safe name */ name: string /** * Optional callback when the screen is ready to exit */ onExit?: () => void } /** * SafeOpenSuccessScreen displays success message after adding an existing Safe to workspace. * This replaces the console.log implementation in commands/account/open.ts * * Features: * - Shows Safe name * - Clean, consistent styling */ export function SafeOpenSuccessScreen({ name, onExit, }: SafeOpenSuccessScreenProps): React.ReactElement { // Auto-exit after rendering useEffect(() => { if (onExit) { onExit() } }, [onExit]) return (
{/* Safe details */} {/* Success message */} Safe ready to use ) }