X-Git-Url: https://git.r.bdr.sh/rbdr/forum/blobdiff_plain/879fa389c2592760def75177eefbd3193e1845c9..605230e032808155d62ed773cc551b5ae1847a5f:/src/routes/%24layout.svelte?ds=sidebyside

diff --git a/src/routes/$layout.svelte b/src/routes/$layout.svelte
index 8fd2ae0..234d26a 100644
--- a/src/routes/$layout.svelte
+++ b/src/routes/$layout.svelte
@@ -4,13 +4,16 @@
 	import { isLoading } from 'svelte-i18n';
 	import { _ } from 'svelte-i18n';
 
-	import { forums } from '$/stores/forums';
+	import { getForums } from '$/stores/forums';
 
 	import ErrorBlock from '$/components/error_block/error_block.svelte';
 	import ForumList from '$/components/forum_list/forum_list.svelte';
 	import Header from '$/components/header/header.svelte';
 	import Loader from '$/components/loader/loader.svelte';
 	import Footer from '$/components/footer/footer.svelte';
+
+	$: store = getForums();
+	$: forums = $store.data;
 </script>
 
 {#if $isLoading}
@@ -21,14 +24,14 @@
 		<slot />
 	</main>
   <nav title={$_('forum_list.title')}>
-    {#if $forums.loading}
+    {#if $store.loading}
       <Loader />
     {/if}
-    {#if $forums.error}
+    {#if $store.error}
       <ErrorBlock message={$_('forum_list.error.unavailable')} />
     {/if}
-    {#if $forums.data}
-      <ForumList forums={$forums.data} />
+    {#if forums}
+      <ForumList forums={forums} />
     {/if}
   </nav>
 	<Footer />
