From 65592982122aed8ae7149955cb9e2bc21213fb70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Sat, 20 Nov 2021 21:39:44 +0100 Subject: [PATCH] Check stock for Shop's add to cart button --- src/components/layouts/PosterLayout.svelte | 6 +++++- src/style/atoms/_button.scss | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/layouts/PosterLayout.svelte b/src/components/layouts/PosterLayout.svelte index 62d2ef6..f48ba2c 100644 --- a/src/components/layouts/PosterLayout.svelte +++ b/src/components/layouts/PosterLayout.svelte @@ -10,6 +10,8 @@ export let product: any export let shopProduct: any + $: hasStock = shopProduct.stock_level > 0 + /** * Preview photos specs @@ -69,8 +71,10 @@
{shopProduct.name} – {shopProduct.price}€