Skip to content

Commit 8217d1d

Browse files
committed
fix: Account selection is far less confusing
Added Changeset
1 parent 18f8f65 commit 8217d1d

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

.changeset/brown-hounds-wink.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
Added prompt for users to select an account.

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Any contributions you make will be via [Pull Requests](https://docs.github.com/e
2424
- Clone your fork to your local machine
2525
```sh
2626
> git clone https://github.com/<your-github-username>/wrangler2
27-
> cd wrangler
27+
> cd wrangler2
2828
```
2929
You can see that your fork is setup as the `origin` remote repository.
3030
Any changes you wish to make should be in a local branch that is then pushed to this origin remote.

packages/wrangler/src/user.tsx

+12-9
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
206206
*/
207207

208208
import React from "react";
209-
import { render } from "ink";
209+
import { render, Text } from "ink";
210210
import Table from "ink-table";
211211
import SelectInput from "ink-select-input";
212212
import fetch from "node-fetch";
@@ -1010,13 +1010,16 @@ export function ChooseAccount(props: {
10101010
onSelect: (item) => void;
10111011
}) {
10121012
return (
1013-
<SelectInput
1014-
items={props.accounts.map((item) => ({
1015-
key: item.id,
1016-
label: item.name,
1017-
value: item,
1018-
}))}
1019-
onSelect={props.onSelect}
1020-
/>
1013+
<>
1014+
<Text bold>Select an account from below:</Text>
1015+
<SelectInput
1016+
items={props.accounts.map((item) => ({
1017+
key: item.id,
1018+
label: item.name,
1019+
value: item,
1020+
}))}
1021+
onSelect={props.onSelect}
1022+
/>
1023+
</>
10211024
);
10221025
}

0 commit comments

Comments
 (0)