Finally got things working. Store act odd when being set under layout.ts?

This commit is contained in:
Scott Idem
2024-02-26 21:04:17 -05:00
parent 060c0500d3
commit 9540aefd50
5 changed files with 231 additions and 103 deletions

View File

@@ -10,7 +10,7 @@ type key_val = {
import { api } from '$lib/api';
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
console.log(api);
// console.log(api);
console.log($ae_loc, $ae_sess, $ae_api);
@@ -32,7 +32,7 @@ onMount(() => {
// // localStorage.getItem(code);
// // if ($ae_loc_test_store) {
// // $ae_loc.hub.ds[code] = $ae_loc_test_store;
// // $ae_loc.ds[code] = $ae_loc_test_store;
// // } else {
// // console.log('Get local storage item miss.');
// // }
@@ -48,14 +48,14 @@ onMount(() => {
// if (data_type == 'text') {
// // console.log(get_data_store_result.text);
// $ae_loc.hub.ds[code] = get_data_store_result.text;
// $ae_loc.ds[code] = get_data_store_result.text;
// } else if (data_type == 'json') {
// // console.log(get_data_store_result.json);
// $ae_loc.hub.ds[code] = get_data_store_result.json;
// $ae_loc.ds[code] = get_data_store_result.json;
// }
// // console.log(`Code: ${$ae_loc.hub.ds[code]}`);
// // console.log(`Code:`, $ae_loc.hub.ds[code]);
// // console.log(`Code: ${$ae_loc.ds[code]}`);
// // console.log(`Code:`, $ae_loc.ds[code]);
// }
// })
// .catch(function (error) {
@@ -65,10 +65,14 @@ onMount(() => {
</script>
<div class="container h-full mx-auto flex justify-center p-5">
{#if $ae_loc.ds['hub__site__root_page_content']}
{@html $ae_loc.ds['hub__site__root_page_content']}
{:else}
<div class="space-y-10 text-center flex flex-col items-center">
<h1 class="h1">One Sky IT's new Aether App Template</h1>
<h2 class="h2">Using Svelte, SvelteKit, Tailwind, Skeleton</h2>
<h2 class="h2">Development using: Svelte, SvelteKit, Tailwind, Skeleton</h2>
<div class="flex justify-center space-x-2">
<a
@@ -86,6 +90,7 @@ onMount(() => {
</a>
</div>
</div>
{/if}
</div>