Skip to content

Commit

Permalink
bug (#30): fixes double rendering
Browse files Browse the repository at this point in the history
Co-authored-by: Prince Wilson <prince.wilson@netlify.com>
  • Loading branch information
tzmanics and maxcell committed May 24, 2022
2 parents 35b3a16 + 1d54452 commit c5650af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/components/AddNotification/AddNotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ const AddNotification = (props) => {
</div>

<div className={styles.actionContainer}>
<Button level={'secondary'}>view my bag (1)</Button>
<Button onClick={() => navigate('/cart')} level={'primary'}>
<Button onClick={props.openCart} level={'secondary'}>
view my bag (1)
</Button>
<Button level="primary" href="/cart">
checkout
</Button>
<div className={styles.linkContainer}>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ const Header = (prop) => {
<div className={styles.bagNotification}>
<span>1</span>
</div>
<div className={styles.notificationContainer}>
<AddNotification />
</div>
</button>
<div className={styles.notificationContainer}>
<AddNotification openCart={() => setShowMiniCart(true)} />
</div>
</div>
</div>

Expand Down

0 comments on commit c5650af

Please sign in to comment.