We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4016af0 commit 219eb8fCopy full SHA for 219eb8f
src/routes/fassungen/[thirties]/FassungenContent.svelte
@@ -1,6 +1,8 @@
1
<script>
2
import { onMount } from 'svelte';
3
import { page } from '$app/stores';
4
+ import { goto } from '$app/navigation';
5
+ import { base } from '$app/paths';
6
7
/** @type {{pages: any}} */
8
let { pages } = $props();
@@ -15,7 +17,8 @@
15
17
(entries) => {
16
18
entries.forEach((entry) => {
19
if (entry.isIntersecting) {
- console.log(entry.target);
20
+ const direction = entry.boundingClientRect.y < 0 ? -1 : 1;
21
+ goto(`${base}/fassungen/${Number($page.data.thirties) + direction}`);
22
}
23
});
24
},
0 commit comments