From bf1450799df0deb424a9675be89e13c29e3620d7 Mon Sep 17 00:00:00 2001
From: Mel <einebeere@gmail.com>
Date: Sat, 19 Feb 2022 20:00:38 +0100
Subject: Split state into stages to handle messages

---
 assets/src/components/SharePage.svelte | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'assets/src/components/SharePage.svelte')

diff --git a/assets/src/components/SharePage.svelte b/assets/src/components/SharePage.svelte
index dff6ba0..c0c6f18 100644
--- a/assets/src/components/SharePage.svelte
+++ b/assets/src/components/SharePage.svelte
@@ -1,8 +1,10 @@
 <script lang="ts">
-    import data from "../stores/data";
     import Header from "./Header.svelte";
     import ShareStatus from "./share/ShareStatus.svelte";
     import RequestList from "./share/RequestList.svelte";
+    import { getShareState, ShareStateType } from "../state/share";
+
+    const state = getShareState().type;
 </script>
 
 <Header color="black" />
@@ -12,7 +14,7 @@
         <ShareStatus />
     </div>
     <div class="right-segment">
-        {#if $data.locked}
+        {#if $state === ShareStateType.SHARING}
             <h1>Requests</h1>
             <RequestList />
         {/if}
-- 
cgit 1.4.1

