From 685d085596a1a20d2b5680cf8000313173bbe6fd Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 27 Jan 2026 10:47:57 -0800 Subject: fix import --- src/lib/utils.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/lib') diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 1b2bdfba..b981a4d4 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -21,15 +21,14 @@ export function scroll(section: any) { const base = browser ? "" : PUBLIC_COINOS_URL; -let ipStore: any; -if (!browser) { - import("$lib/server/ip").then((m) => { - ipStore = m.ipStore; - }); -} +let getIp: (() => string | undefined) | undefined; + +export const setIpGetter = (fn: () => string | undefined) => { + getIp = fn; +}; const ipHeaders = (): Record => { - const ip = ipStore?.getStore(); + const ip = getIp?.(); return ip ? { "cf-connecting-ip": ip } : {}; }; -- cgit v1.2.3