Skip to content

Commit

Permalink
change loader position in DOM
Browse files Browse the repository at this point in the history
  • Loading branch information
BoikoYV committed Oct 31, 2021
1 parent 1406411 commit c8dc7eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/Cart/Cart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ const Cart = () => {
}

let content;
if (isLoading) {
content = (<Loader />)
} else if (hasError) {

if (hasError) {
content = (<div>Sorry, error</div>)
} else {
const filteredCards = cardsList.filter(({ articul }) => {
Expand All @@ -69,6 +68,7 @@ const Cart = () => {
<div className={styles.cartSection}>
<div className={styles.container}>
<h2 className={styles.cartTitle}>1. Products - {cardsInCart.length}</h2>
{isLoading ? <Loader /> : ''}
{cardsInCart.length >= 1 ?
<div className={styles.cartInner}>
<ul className={styles.listTitles}>
Expand Down

0 comments on commit c8dc7eb

Please sign in to comment.