import React, { useEffect } from 'react' import { Box, Text } from 'ink' import { Header, KeyValue } from '../components/index.js' import { theme } from '../theme.js' export interface TransactionExportSuccessScreenProps { /** * Output file path */ outputFile: string /** * Optional callback when the screen is ready to exit */ onExit?: () => void } /** * TransactionExportSuccessScreen displays success message after exporting a transaction. * This replaces the console.log implementation in commands/tx/export.ts * * Features: * - Shows export file path * - Displays import command for sharing * - Clean, consistent styling */ export function TransactionExportSuccessScreen({ outputFile, onExit, }: TransactionExportSuccessScreenProps): React.ReactElement { // Auto-exit after rendering useEffect(() => { if (onExit) { onExit() } }, [onExit]) return (
{/* Export details */} {/* Instructions */} Share this file with other Safe owners: safe tx import {outputFile} {/* Success message */} Export complete ) }