Use global value to check for current Shop product

Also add other stores types to hint on expected values
This commit is contained in:
2022-06-22 23:20:52 +02:00
parent 255b00ab66
commit 6d4224abea
4 changed files with 21 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
<script lang="ts">
import { getContext } from 'svelte'
import { shopCurrentProductSlug } from '$utils/stores/shop'
// Components
import PageTransition from '$components/PageTransition.svelte'
import Metas from '$components/Metas.svelte'
@@ -11,6 +12,9 @@
export let shopProduct: any
const { posters } = getContext('shop')
// Update current random product slug
$shopCurrentProductSlug = product.location.slug
</script>
<Metas