Use Lenis to use smooth scroll to anchors
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
import { getContext, onMount } from 'svelte'
|
||||
import { timeline, stagger } from 'motion'
|
||||
import { DELAY } from '$utils/contants'
|
||||
import { smoothScroll } from '$utils/functions'
|
||||
import { smoothScroll } from '$utils/stores'
|
||||
import { getAssetUrlKey } from '$utils/api'
|
||||
import reveal from '$animations/reveal'
|
||||
import { quartOut } from '$animations/easings'
|
||||
@@ -105,7 +105,7 @@
|
||||
{settings.description}
|
||||
</p>
|
||||
|
||||
<Button url="#locations" text="Explore locations" on:click={event => smoothScroll({ hash: 'locations', event })}>
|
||||
<Button url="#locations" text="Explore locations" on:click={() => $smoothScroll.scrollTo('#locations', { duration: 2 })}>
|
||||
<IconEarth animate={true} />
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user