From 2a9ae628347bcd004de8a1f787f1fb709e950423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Mon, 25 Jan 2021 08:43:28 +0100 Subject: [PATCH] switches context to use sdk instead of it's own context --- packages/client/src/components/ClientApp.svelte | 1 - packages/client/src/components/NotificationDisplay.svelte | 2 +- packages/client/src/sdk.js | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/client/src/components/ClientApp.svelte b/packages/client/src/components/ClientApp.svelte index b2dd927106..4af1f198d5 100644 --- a/packages/client/src/components/ClientApp.svelte +++ b/packages/client/src/components/ClientApp.svelte @@ -10,7 +10,6 @@ setContext("sdk", SDK) setContext("component", writable({})) setContext("data", createDataStore()) - setContext("notifications", notificationStore) setContext("screenslot", false) let loaded = false diff --git a/packages/client/src/components/NotificationDisplay.svelte b/packages/client/src/components/NotificationDisplay.svelte index 8b6fca805e..f398b7f3bc 100644 --- a/packages/client/src/components/NotificationDisplay.svelte +++ b/packages/client/src/components/NotificationDisplay.svelte @@ -2,7 +2,7 @@ import { flip } from 'svelte/animate'; import { fly } from "svelte/transition" import { getContext } from "svelte" - const notifications = getContext("notifications") + const { notifications } = getContext("sdk") export let themes = { danger: "#E26D69", diff --git a/packages/client/src/sdk.js b/packages/client/src/sdk.js index 0d2e538d4a..98cff20679 100644 --- a/packages/client/src/sdk.js +++ b/packages/client/src/sdk.js @@ -13,7 +13,7 @@ import DataProvider from "./components/DataProvider.svelte" export default { API, authStore, - notificationStore, + notifications: notificationStore, routeStore, screenStore, styleable,