From cccbb01e3ad758dc851379f1f2529b82f686c01e Mon Sep 17 00:00:00 2001 From: buttercat1791 Date: Tue, 29 Jul 2025 16:36:25 -0500 Subject: [PATCH] Add TODOs for next steps --- src/lib/utils/nostrUtils.ts | 3 +++ src/routes/publication/[type]/[identifier]/+layout.server.ts | 2 ++ src/routes/publication/[type]/[identifier]/+layout.svelte | 1 + 3 files changed, 6 insertions(+) diff --git a/src/lib/utils/nostrUtils.ts b/src/lib/utils/nostrUtils.ts index 813f1e5..5faa1bb 100644 --- a/src/lib/utils/nostrUtils.ts +++ b/src/lib/utils/nostrUtils.ts @@ -430,6 +430,9 @@ Promise.prototype.withTimeout = function ( return withTimeout(timeoutMs, this); }; +// TODO: Implement fetch for no-auth relays using the WebSocketPool and raw WebSockets. +// This fetch function will be used for server-side loading. + /** * Fetches an event using a two-step relay strategy: * 1. First tries standard relays with timeout diff --git a/src/routes/publication/[type]/[identifier]/+layout.server.ts b/src/routes/publication/[type]/[identifier]/+layout.server.ts index 1209f7b..2c6bebe 100644 --- a/src/routes/publication/[type]/[identifier]/+layout.server.ts +++ b/src/routes/publication/[type]/[identifier]/+layout.server.ts @@ -5,6 +5,8 @@ import { getMatchingTags, fetchEventById, fetchEventByDTag, fetchEventByNaddr, f export const load: LayoutServerLoad = async ({ params, parent, url }) => { const { type, identifier } = params; + + // TODO: Remove the need for NDK in nostrUtils dependencies, since NDK is not available on the server. // deno-lint-ignore no-explicit-any const { ndk } = (await parent()) as any; diff --git a/src/routes/publication/[type]/[identifier]/+layout.svelte b/src/routes/publication/[type]/[identifier]/+layout.svelte index 84dbc3b..ce533f6 100644 --- a/src/routes/publication/[type]/[identifier]/+layout.svelte +++ b/src/routes/publication/[type]/[identifier]/+layout.svelte @@ -5,6 +5,7 @@ const { metadata } = data; + {metadata.title}