Use options parameters with types and default on smoothScroll function

This commit is contained in:
2022-07-19 13:43:25 +02:00
parent 3ba5a100c8
commit 6a66cdaf22
5 changed files with 15 additions and 9 deletions

View File

@@ -107,7 +107,7 @@
<ul>
{#each shopLocations as { name, slug }}
<li class:is-active={product && slug === product.location.slug}>
<a href="/shop/poster-{slug}" on:click={() => smoothScroll('poster')} sveltekit:prefetch sveltekit:noscroll>
<a href="/shop/poster-{slug}" on:click={() => smoothScroll({ hash: 'poster' })} sveltekit:prefetch sveltekit:noscroll>
{name}
</a>
</li>