Skip to content

Commit 5f64904

Browse files
authored
Merge pull request #84 from GitGud-org/something
added space in DeleteBranch between branchList
2 parents d94564c + 1e50a49 commit 5f64904

File tree

1 file changed

+31
-29
lines changed

1 file changed

+31
-29
lines changed

components/DeleteBranch.js

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,41 @@ const { execSync } = require("child_process");
55
const TextInput = require("ink-text-input").default;
66

77
const DeleteTab = (props) => {
8-
//Uses git branch and displays all local branches
9-
//Takes in an input to for delete branch
8+
//Uses git branch and displays all local branches
9+
//Takes in an input to for delete branch
1010

11-
const [del, setDelete] = useState('')
11+
const [del, setDelete] = useState("");
1212

13-
let { refreshTab } = props
13+
let { refreshTab } = props;
1414

15-
let branchList = execSync('git branch').toString().split('\n')
16-
let branches = branchList
15+
let branchList = execSync("git branch").toString().split("\n");
16+
let branches = branchList;
1717

18-
const handleSubmit = () => {
18+
const handleSubmit = () => {
1919
try {
20-
execSync('git branch -D ' + del + '')
21-
refreshTab('')
20+
execSync("git branch -D " + del + "");
21+
refreshTab("");
2222
} catch (error) {}
23-
}
24-
return (
25-
<Box flexDirection='column'>
26-
<Box><Text> </Text></Box>
27-
<Box>
28-
<Text color='red'> Branches: </Text>
29-
<Text>{branches}</Text>
30-
</Box>
31-
<Box >
32-
<Box>
33-
<Text color='red'> Delete Branch: </Text>
34-
<TextInput value={del} onChange={setDelete} onSubmit={handleSubmit} />
35-
</Box>
36-
</Box>
37-
<Newline />
38-
<Text color='gray'> Press ESC to go back </Text>
39-
</Box>
40-
)
41-
}
23+
};
24+
return (
25+
<Box flexDirection="column">
26+
<Box>
27+
<Text> </Text>
28+
</Box>
29+
<Box>
30+
<Text color="red"> Branches: </Text>
31+
<Text>{branches.join(" ")}</Text>
32+
</Box>
33+
<Box>
34+
<Box>
35+
<Text color="red"> Delete Branch: </Text>
36+
<TextInput value={del} onChange={setDelete} onSubmit={handleSubmit} />
37+
</Box>
38+
</Box>
39+
<Newline />
40+
<Text color="gray"> Press ESC to go back </Text>
41+
</Box>
42+
);
43+
};
4244

43-
module.exports = DeleteTab
45+
module.exports = DeleteTab;

0 commit comments

Comments
 (0)