Show a notification when adding a product to Cart

This commit is contained in:
2021-11-07 20:18:19 +01:00
parent 03cc79da69
commit e1c259164f
7 changed files with 92 additions and 24 deletions

View File

@@ -1,5 +1,6 @@
<script lang="ts">
import { onMount } from 'svelte'
import { cartNotifications } from '$utils/store'
// Components
import Metas from '$components/Metas.svelte'
import SiteTitle from '$components/atoms/SiteTitle.svelte'
@@ -105,7 +106,13 @@
<ButtonCart />
<div class="shop-location__notifications">
<NotificationCart />
{#each $cartNotifications as { id, title, name, image } (id)}
<NotificationCart
title={title}
name={name}
image={image}
/>
{/each}
</div>
</nav>