Skip to content

Commit

Permalink
fix: cart not being cleard on success
Browse files Browse the repository at this point in the history
  • Loading branch information
theClarkSell committed Jul 12, 2023
1 parent b669e23 commit ce69c0c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/routes/orders/success/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
<script>
import { onMount, getContext } from 'svelte';
import Layout from '../_components/_Layout.svelte';
import NewsletterSignup from '$components/newsletter/Wide.svelte';
const { send } = getContext('cart');
onMount(() => {
send('CLEAR_CART');
});
</script>

<Layout>
Expand Down

0 comments on commit ce69c0c

Please sign in to comment.