Add any types for getContext data
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
import ShopHeader from '$components/organisms/ShopHeader.svelte'
|
||||
import PostersGrid from '$components/organisms/PostersGrid.svelte'
|
||||
|
||||
const { posters } = getContext('shop')
|
||||
const { posters }: any = getContext('shop')
|
||||
const errors = {
|
||||
404: {
|
||||
title: 'Product not found',
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
export let data: PageData
|
||||
|
||||
const { product, shopProduct } = data
|
||||
const { posters } = getContext('shop')
|
||||
const { product, shopProduct }: { product: any, shopProduct: any } = data
|
||||
const { posters }: any = getContext('shop')
|
||||
|
||||
// Update current random product slug
|
||||
$shopCurrentProductSlug = product.location.slug
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
export let data: PageData
|
||||
|
||||
const { posters } = getContext('shop')
|
||||
const { posters }: any = getContext('shop')
|
||||
|
||||
$shopCurrentProductSlug = data.product.location.slug
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user