Skip to content

Commit

Permalink
Update user token store within component
Browse files Browse the repository at this point in the history
  • Loading branch information
dokempf committed Sep 24, 2024
1 parent d07a037 commit 3c236e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
}
let selected_masks = [];
$: userTokenStore.set(token);
function dumpStores() {
console.log("appLanguageStore: ", $appLanguageStore);
console.log("easydbInstanceStore: ", $easydbInstanceStore);
Expand Down Expand Up @@ -182,7 +180,7 @@
</div>
</div>
<div class="w-1/2 p-4 border border-gray-300">
<EasyDbDetailView systemid={systemid} appLanguage={selected_app_language} dataLanguages={selected_data_languages} easydbInstance={instance} mask={mask} masksToRender={selected_masks} />
<EasyDbDetailView systemid={systemid} appLanguage={selected_app_language} dataLanguages={selected_data_languages} easydbInstance={instance} mask={mask} masksToRender={selected_masks} token={token}/>
</div>
</div>
</main>
4 changes: 3 additions & 1 deletion src/components/EasyDBDetailView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import '../app.pcss';
import { pregen_instance } from "../lib/easydbPregen";
import { appLanguageStore, dataLanguagesStore, easydbInstanceStore, easydbInstanceDataStore, systemidStore, userGivenMasksToRenderStore } from "../lib/stores";
import { appLanguageStore, dataLanguagesStore, easydbInstanceStore, easydbInstanceDataStore, systemidStore, userGivenMasksToRenderStore, userTokenStore } from "../lib/stores";
import DetailViewImpl from "./logic/DetailViewImpl.svelte";
import Waiting from "./utils/Waiting.svelte";
Expand All @@ -15,12 +15,14 @@
export let easydbInstance = pregen_instance;
export let mask = "";
export let masksToRender = [];
export let token = "";
$: appLanguageStore.set(appLanguage);
$: dataLanguagesStore.set(dataLanguages);
$: easydbInstanceStore.set(easydbInstance);
$: userGivenMasksToRenderStore.set(masksToRender)
$: systemidStore.set([systemid]);
$: userTokenStore.set(token);
</script>

{#if !$easydbInstanceDataStore || ($easydbInstanceDataStore.instance !== easydbInstance) }
Expand Down

0 comments on commit 3c236e6

Please sign in to comment.