From b97bd6ae123fd2c14e0a706e0a2fabd2bf032e43 Mon Sep 17 00:00:00 2001 From: limina1 Date: Wed, 23 Jul 2025 14:09:07 -0400 Subject: [PATCH] refactor - use names from consts.ts --- .../navigator/EventNetwork/utils/starNetworkBuilder.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib/navigator/EventNetwork/utils/starNetworkBuilder.ts b/src/lib/navigator/EventNetwork/utils/starNetworkBuilder.ts index 985e607..2e58ff9 100644 --- a/src/lib/navigator/EventNetwork/utils/starNetworkBuilder.ts +++ b/src/lib/navigator/EventNetwork/utils/starNetworkBuilder.ts @@ -12,10 +12,8 @@ import type { NetworkNode, NetworkLink, GraphData, GraphState } from "../types"; import { getMatchingTags } from '$lib/utils/nostrUtils'; import { createNetworkNode, createEventMap, extractEventIdFromATag, getEventColor } from './networkBuilder'; import { createDebugFunction } from './common'; +import { wikiKind, indexKind, zettelKinds } from '$lib/consts'; -// Configuration -const INDEX_EVENT_KIND = 30040; -const CONTENT_EVENT_KIND = 30041; // Debug function const debug = createDebugFunction("StarNetworkBuilder"); @@ -124,8 +122,8 @@ export function createStarNetworks( }; // Find all index events and non-publication events - const publicationKinds = [30040, 30041, 30818]; - const indexEvents = events.filter(event => event.kind === INDEX_EVENT_KIND); + const publicationKinds = [wikiKind, indexKind, ...zettelKinds]; + const indexEvents = events.filter(event => event.kind === indexKind); const nonPublicationEvents = events.filter(event => event.kind !== undefined && !publicationKinds.includes(event.kind) );