Implement weight components
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user