-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Expand file tree
/
Copy pathErrorStep.tsx
More file actions
45 lines (43 loc) · 1.42 KB
/
Copy pathErrorStep.tsx
File metadata and controls
45 lines (43 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { GITHUB_ACTION_SETUP_DOCS_URL } from '../../constants/github-app.js';
import { Box, Text } from '@anthropic/ink';
interface ErrorStepProps {
error: string | undefined;
errorReason?: string;
errorInstructions?: string[];
}
export function ErrorStep({ error, errorReason, errorInstructions }: ErrorStepProps) {
return (
<>
<Box flexDirection="column" borderStyle="round" paddingX={1}>
<Box flexDirection="column" marginBottom={1}>
<Text bold>Install GitHub App</Text>
</Box>
<Text color="error">Error: {error}</Text>
{errorReason && (
<Box marginTop={1}>
<Text dimColor>Reason: {errorReason}</Text>
</Box>
)}
{errorInstructions && errorInstructions.length > 0 && (
<Box flexDirection="column" marginTop={1}>
<Text dimColor>How to fix:</Text>
{errorInstructions.map((instruction, index) => (
<Box key={index} marginLeft={2}>
<Text dimColor>• </Text>
<Text>{instruction}</Text>
</Box>
))}
</Box>
)}
<Box marginTop={1}>
<Text dimColor>
For manual setup instructions, see: <Text color="claude">{GITHUB_ACTION_SETUP_DOCS_URL}</Text>
</Text>
</Box>
</Box>
<Box marginLeft={3}>
<Text dimColor>Press any key to exit</Text>
</Box>
</>
);
}