]> git.r.bdr.sh - rbdr/forum/blobdiff - src/routes/__layout.svelte
Lint, rm unused code
[rbdr/forum] / src / routes / __layout.svelte
index 007781075796fd16a0ca4aba114d78676e6ebc56..16ae5dc3f5aa535e307f8b70e65f9be974670e55 100644 (file)
@@ -5,16 +5,13 @@
        import { isLoading } from 'svelte-i18n';
        import { _ } from 'svelte-i18n';
 
-       import { getForums } from '$lib/stores/forums';
+       import { forums } from '$lib/stores/forums';
 
        import ErrorBlock from '$lib/components/error_block/error_block.svelte';
        import ForumList from '$lib/components/forum_list/forum_list.svelte';
        import Header from '$lib/components/header/header.svelte';
        import Loader from '$lib/components/loader/loader.svelte';
        import Footer from '$lib/components/footer/footer.svelte';
-
-       $: store = getForums();
-       $: forums = $store.data;
 </script>
 
 {#if $isLoading}
                <slot />
        </main>
        <nav
-               class="col-start-1 row-start-2 border-r-2 border-2-black border-solid"
+               class="col-start-1 row-start-2 border-r border-r-black border-solid"
                title={$_('forum_list.title')}
        >
-               {#if $store.loading}
+               {#if $forums.loading}
                        <Loader />
                {/if}
-               {#if $store.error}
+               {#if $forums.error}
                        <ErrorBlock message={$_('forum_list.error.unavailable')} />
                {/if}
-               {#if forums}
-                       <ForumList {forums} />
+               {#if $forums.data}
+                       <ForumList forums={$forums.data} />
                {/if}
        </nav>
        <Footer />