added chart
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import { page } from '$app/state';
|
||||
import { ApiError } from '$lib/api';
|
||||
import { auth } from '$lib/auth.svelte';
|
||||
import PriceChart from '$lib/PriceChart.svelte';
|
||||
import {
|
||||
lists,
|
||||
listsApi,
|
||||
@@ -403,18 +404,8 @@
|
||||
<div class="border-t border-smoke pt-3">
|
||||
{#if historyLoading}
|
||||
<p class="text-xs text-mute flicker">loading history…</p>
|
||||
{:else if history.length === 0}
|
||||
<p class="text-xs text-mute">no price checks yet — hit refresh to start tracking.</p>
|
||||
{:else}
|
||||
<ul class="space-y-1 text-xs">
|
||||
{#each history as h}
|
||||
<li class="flex items-center justify-between gap-3">
|
||||
<span class="text-ink">{money(h.price, h.currency)}</span>
|
||||
{#if h.in_stock === false}<span class="text-rose">sold out</span>{/if}
|
||||
<span class="text-mute">{fmtDate(h.fetched_at)}</span>
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
<PriceChart {history} target={item.target_price} currency={item.currency} />
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user