mirror of
https://github.com/aljazceru/hypergolic.git
synced 2026-01-25 00:04:24 +01:00
problem: products in product group recycle existing invoice
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
import { Button } from '$lib/components/ui/button/index.js';
|
||||
import { ndk } from '@/ndk';
|
||||
import { currentUser } from '@/stores/session';
|
||||
import { NDKEvent, NDKZap } from '@nostr-dev-kit/ndk';
|
||||
import { NDKZap } from '@nostr-dev-kit/ndk';
|
||||
import { Terminal } from 'lucide-svelte';
|
||||
import { requestProvider } from 'webln';
|
||||
import QrCodeSvg from './QrCodeSvg.svelte';
|
||||
@@ -50,6 +50,13 @@
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
let previousProduct: Product;
|
||||
$: if (product !== previousProduct) {
|
||||
invoice = null;
|
||||
previousProduct = product;
|
||||
}
|
||||
|
||||
let open: boolean;
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { ndk } from '@/ndk';
|
||||
import type { NDKEvent } from '@nostr-dev-kit/ndk';
|
||||
import ProductCard from './ProductCard.svelte';
|
||||
import { fetchEvent } from '@/event_helpers/products';
|
||||
import { Product, type Rocket } from '@/event_helpers/rockets';
|
||||
export let productID: string | undefined = undefined;
|
||||
export let rocket: Rocket;
|
||||
export let product:Product | undefined = undefined;
|
||||
export let product: Product | undefined = undefined;
|
||||
|
||||
onMount(() => {
|
||||
if (!product && productID) {
|
||||
fetchEvent(productID, $ndk).then(e => product = new Product(e))
|
||||
fetchEvent(productID, $ndk).then((e) => (product = new Product(e)));
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
{#if product}
|
||||
|
||||
Reference in New Issue
Block a user