Skip to content

Commit

Permalink
fix: Account selection is far less confusing (#239)
Browse files Browse the repository at this point in the history
Added Changeset
  • Loading branch information
Warfields authored Jan 14, 2022
1 parent 165ab70 commit 0431093
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/brown-hounds-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": patch
---

Added prompt for users to select an account.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Any contributions you make will be via [Pull Requests](https://docs.github.com/e
- Clone your fork to your local machine
```sh
> git clone https://github.com/<your-github-username>/wrangler2
> cd wrangler
> cd wrangler2
```
You can see that your fork is setup as the `origin` remote repository.
Any changes you wish to make should be in a local branch that is then pushed to this origin remote.
Expand Down
21 changes: 12 additions & 9 deletions packages/wrangler/src/user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
*/

import React from "react";
import { render } from "ink";
import { render, Text } from "ink";
import Table from "ink-table";
import SelectInput from "ink-select-input";
import fetch from "node-fetch";
Expand Down Expand Up @@ -1010,13 +1010,16 @@ export function ChooseAccount(props: {
onSelect: (item) => void;
}) {
return (
<SelectInput
items={props.accounts.map((item) => ({
key: item.id,
label: item.name,
value: item,
}))}
onSelect={props.onSelect}
/>
<>
<Text bold>Select an account from below:</Text>
<SelectInput
items={props.accounts.map((item) => ({
key: item.id,
label: item.name,
value: item,
}))}
onSelect={props.onSelect}
/>
</>
);
}

0 comments on commit 0431093

Please sign in to comment.