From d8a062f0ec256c6da1cd74d2c30fe771fd4f8f7d Mon Sep 17 00:00:00 2001 From: gsovereignty Date: Wed, 3 Jul 2024 14:42:27 +0800 Subject: [PATCH] problem: can't view rocket events --- src/components/RocketCard.svelte | 19 +++++++++++ src/components/Todo.svelte | 20 +++++++++++ src/views/rockets/Rockets.svelte | 58 ++++++-------------------------- 3 files changed, 49 insertions(+), 48 deletions(-) create mode 100644 src/components/RocketCard.svelte create mode 100644 src/components/Todo.svelte diff --git a/src/components/RocketCard.svelte b/src/components/RocketCard.svelte new file mode 100644 index 0000000..4490c42 --- /dev/null +++ b/src/components/RocketCard.svelte @@ -0,0 +1,19 @@ + + + + + {rocketEvent.getMatchingTags('d')[0][1]} + {rocketEvent.getMatchingTags('mission')[0][1]} + + + + + + + diff --git a/src/components/Todo.svelte b/src/components/Todo.svelte new file mode 100644 index 0000000..a6aa24f --- /dev/null +++ b/src/components/Todo.svelte @@ -0,0 +1,20 @@ + + + + + Todo: + + {#if text.length > 1} +
    + {#each text as t}
  • {t}
  • {/each} +
+ {:else} + {text} + {/if} + +
+
diff --git a/src/views/rockets/Rockets.svelte b/src/views/rockets/Rockets.svelte index 453bbd5..81dfa7e 100644 --- a/src/views/rockets/Rockets.svelte +++ b/src/views/rockets/Rockets.svelte @@ -4,7 +4,8 @@ import type { NDKEvent } from '@nostr-dev-kit/ndk'; import { onDestroy } from 'svelte'; import { ndk } from '@/ndk'; - //flow: fetch all 31108's. For now, just validate that the author is the same as the ignition author. If naming conflicts, look for namerocket listing. + import Todo from '../../components/Todo.svelte'; + import RocketCard from '../../components/RocketCard.svelte'; let entries: NDKEventStore | undefined; onDestroy(() => { @@ -12,54 +13,15 @@ }); entries = $ndk.storeSubscribe([{ kinds: [31108 as number] }], { subId: 'rockets' }); - - + //todo: until we have namerocket working, just manually dedupe rockets based on my pubkey + //todo: write a recognizer/validator for rocket events -{#if entries && $entries} -{#each $entries as e}
{console.log(e.rawEvent())}}>{e.tags}

{/each} +{#if entries && $entries} + + + {#each $entries as rocketEvent} + + {/each} {/if} -
- - - -
- -
- The People's Rocket -
-
-

- Dedicated to delivering excellence through central planning. -

-

Created by PabloF7z

- - Read more - - -
-