From a4d2e9b2ca98a0610c456587d69ed7057e99a701 Mon Sep 17 00:00:00 2001 From: Jared Kobos Date: Mon, 25 Mar 2019 14:44:16 -0400 Subject: [PATCH] Remove creation type from auto-generated label --- src/features/linodes/LinodesCreate/LinodeCreateContainer.tsx | 5 ++++- src/features/linodes/LinodesCreate/withLabelGenerator.tsx | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/features/linodes/LinodesCreate/LinodeCreateContainer.tsx b/src/features/linodes/LinodesCreate/LinodeCreateContainer.tsx index 54d6c1151d3..f0bbad4625d 100644 --- a/src/features/linodes/LinodesCreate/LinodeCreateContainer.tsx +++ b/src/features/linodes/LinodesCreate/LinodeCreateContainer.tsx @@ -307,7 +307,10 @@ class LinodeCreateContainer extends React.PureComponent { arg2 = selectedRegion ? selectedRegion.id : ''; } - arg3 = this.props.createType; + if (this.props.createType === 'fromLinode') { + // @todo handle any other custom label cases we'd like to have here + arg3 = 'clone'; + } return getLabel(arg1, arg2, arg3); }; diff --git a/src/features/linodes/LinodesCreate/withLabelGenerator.tsx b/src/features/linodes/LinodesCreate/withLabelGenerator.tsx index 2f639b186c5..f0146b0e8a9 100644 --- a/src/features/linodes/LinodesCreate/withLabelGenerator.tsx +++ b/src/features/linodes/LinodesCreate/withLabelGenerator.tsx @@ -88,7 +88,7 @@ export default withLabelGenerator; // Utilities -// Searches 'existingLabels' and appends a zero-padded incrementer to the original label +// Searches 'existingLabels' and appends a zero-padded increment-er to the original label export const dedupeLabel = ( label: string, existingLabels: string[]