Преглед изворни кода

Improve styles for empty shopping list. Remove selection after merging items (annoying UX)

Tatiana Inama пре 6 година
родитељ
комит
5545ba0e7c

+ 0 - 1
recipes/src/containers/ShoppingCart/View/index.tsx

@@ -100,7 +100,6 @@ class ShoppingCartView extends React.Component<ShoppingCartViewProps, ShoppingCa
       try {
         const result = this.props.mergeItemsCart(this.state.selected, combineMultipleItems(this.state.selected));
         this.clearSelection(() => {
-          this.selectItem(result.payload.newItem);
           this.setState({
             saveDisabled: false
           })

+ 4 - 0
recipes/src/containers/ShoppingCart/View/styles.scss

@@ -3,6 +3,10 @@
 .cbk-shopping-cart-view {
   margin: $spacing-small;
   @include box();
+  &--empty {
+    padding: $spacing-regular;
+    text-align: center;
+  }
   &__items {
     .cbk-shopping-list {
       column-count: 2;