Fix scrolling

This commit is contained in:
ZXY101
2023-09-13 20:47:06 +02:00
parent b96a44d2c2
commit d6730a2223
2 changed files with 6 additions and 16 deletions

View File

@@ -12,6 +12,12 @@
afterNavigate(() => {
isReader = $page.route.id === '/[manga]/[volume]';
if (isReader) {
window.document.body.classList.add('reader');
} else {
window.document.body.classList.remove('reader');
}
});
</script>

View File

@@ -1,19 +1,3 @@
<script lang="ts">
import { currentVolume } from '$lib/catalog';
import { onMount } from 'svelte';
import { goto } from '$app/navigation';
const volume = $currentVolume;
onMount(() => {
if (!volume) {
goto('/');
} else {
window.document.body.classList.add('reader');
}
});
</script>
<slot />
<style>