import React, { useEffect } from 'react'; import { Text, Box, useApp } from 'ink'; import { simpleGit } from 'simple-git'; import Gradient from 'ink-gradient'; import Spinner from 'ink-spinner'; const git = simpleGit(); type CloningProps = { path: string; onFinished: () => void; }; const Cloning: React.FC = ({ path, onFinished }) => { const app = useApp(); useEffect(() => { git.clone('https://github.com/TaylorBeeston/LCHTTPTest', path, ['-q']) .then(onFinished) .catch(error => { app.exit(); console.error(error); }); }, []); return ( Cloning into {path}... ); }; export default Cloning;