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:
@@ -22,7 +22,7 @@
|
||||
|
||||
<div class="switcher {type}">
|
||||
<div class="switcher__text" class:empty={!location}>
|
||||
<a href="/">
|
||||
<a href="/" sapper-noscroll>
|
||||
{#if !location}
|
||||
<span class="top">Houses</span>
|
||||
<span class="bottom">
|
||||
@@ -36,7 +36,7 @@
|
||||
</div>
|
||||
|
||||
<div class="button-control button-control--dashed switcher__icon">
|
||||
<a href="/choose">
|
||||
<a href="/choose" sapper-noscroll>
|
||||
<IconGlobe
|
||||
color={type.includes('side') ? '#333' : '#fff'}
|
||||
width={type.includes('side') ? 18 : 24}
|
||||
|
||||
Reference in New Issue
Block a user