Skip to content

Commit

Permalink
Remove state (#942)
Browse files Browse the repository at this point in the history
  • Loading branch information
ograu authored Jan 8, 2020
1 parent ec4cf59 commit 561bf0e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/components/Cluster/NewCluster/CreateNodePoolsCluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,6 @@ class CreateNodePoolsCluster extends Component {
},
submitting: false,
error: false,
availabilityZonesRandom: {
// Select automatically
value: 1,
valid: true,
},
availabilityZonesLabels: {
// Manually select AZs
number: 0,
Expand Down Expand Up @@ -250,7 +245,6 @@ class CreateNodePoolsCluster extends Component {
name,
hasAZLabels,
availabilityZonesLabels,
availabilityZonesRandom,
nodePoolsForms,
} = this.state;

Expand All @@ -265,8 +259,7 @@ class CreateNodePoolsCluster extends Component {
const isValid =
name.valid &&
areNodePoolsValid &&
((hasAZLabels && availabilityZonesLabels.valid) ||
(!hasAZLabels && availabilityZonesRandom.valid))
((hasAZLabels && availabilityZonesLabels.valid) || !hasAZLabels)
? true
: false;

Expand Down

0 comments on commit 561bf0e

Please sign in to comment.