Implement weight components

This commit is contained in:
2024-08-09 23:40:31 +02:00
parent e8da257bf1
commit 2f161bed79
6 changed files with 68 additions and 76 deletions

View File

@@ -1,8 +1,18 @@
<script lang="ts">
import WeightTable from '$components/Weight/WeightTable.svelte'
import { weightStore } from '$lib/store/weight/weightStore'
import WeightTable from "$components/Weight/WeightTable.svelte";
import { weightStore } from "$lib/store/Weight/weightStore";
let forceUpdate = false;
weightStore.subscribe(() => {
console.log("updte");
forceUpdate = !forceUpdate;
});
</script>
<template>
<WeightTable items="{$weightStore}" />
{#if forceUpdate}
<WeightTable items={$weightStore} />
{:else}
<WeightTable items={$weightStore} />
{/if}
</template>