Преглед на файлове

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

Tatiana Inama преди 6 години
родител
ревизия
5545ba0e7c
променени са 2 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 0 1
      recipes/src/containers/ShoppingCart/View/index.tsx
  2. 4 0
      recipes/src/containers/ShoppingCart/View/styles.scss

+ 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;