import React, { useEffect } from 'react' import { Box, Text } from 'ink' import { Header, KeyValue } from '../components/index.js' import { theme } from '../theme.js' export interface ChainAddSuccessScreenProps { /** * Chain name */ chainName: string /** * Chain ID */ chainId: string /** * Optional callback when the screen is ready to exit */ onExit?: () => void } /** * ChainAddSuccessScreen displays success message after adding a chain. * This replaces the p.outro implementation in commands/config/chains.ts * * Features: * - Shows added chain details * - Clean, consistent styling */ export function ChainAddSuccessScreen({ chainName, chainId, onExit, }: ChainAddSuccessScreenProps): React.ReactElement { // Auto-exit after rendering useEffect(() => { if (onExit) { onExit() } }, [onExit]) return (
{/* Chain details */} {/* Success message */} Chain configuration saved ) }