Avoid route change scroll when clicking on links

sapper-noscroll here for the rescue, keeps the scroll position and loads the new page content
This commit is contained in:
2020-03-06 11:06:35 +01:00
parent 78a85bbf0b
commit debf8bb747
7 changed files with 11 additions and 8 deletions

View File

@@ -4,7 +4,7 @@
</script>
<div class="location" data-aos="location">
<a href="/location/{location.country.slug}/{location.slug}" rel="prefetch">
<a href="/location/{location.country.slug}/{location.slug}" rel="prefetch" sapper-noscroll>
<img src={location.country.flag.full_url} alt="Flag of {location.country.name}">
<div class="anim-mask mask-city">
<h3 class="location__city">{location.name}</h3>