From 04310932118921d4566ccf6c803b9980dc986089 Mon Sep 17 00:00:00 2001 From: Samuel Warfield Date: Fri, 14 Jan 2022 12:24:51 -0700 Subject: [PATCH] fix: Account selection is far less confusing (#239) Added Changeset --- .changeset/brown-hounds-wink.md | 5 +++++ CONTRIBUTING.md | 2 +- packages/wrangler/src/user.tsx | 21 ++++++++++++--------- 3 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 .changeset/brown-hounds-wink.md diff --git a/.changeset/brown-hounds-wink.md b/.changeset/brown-hounds-wink.md new file mode 100644 index 000000000000..87ba8dba343d --- /dev/null +++ b/.changeset/brown-hounds-wink.md @@ -0,0 +1,5 @@ +--- +"wrangler": patch +--- + +Added prompt for users to select an account. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1fc0af9fd8a3..ead7a7be3061 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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//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. diff --git a/packages/wrangler/src/user.tsx b/packages/wrangler/src/user.tsx index e66d37c7c3ed..39b471b14fc8 100644 --- a/packages/wrangler/src/user.tsx +++ b/packages/wrangler/src/user.tsx @@ -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"; @@ -1010,13 +1010,16 @@ export function ChooseAccount(props: { onSelect: (item) => void; }) { return ( - ({ - key: item.id, - label: item.name, - value: item, - }))} - onSelect={props.onSelect} - /> + <> + Select an account from below: + ({ + key: item.id, + label: item.name, + value: item, + }))} + onSelect={props.onSelect} + /> + ); }