From 1bae891594a737856d5884603a0154c5e4353b17 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Mon, 24 Jun 2024 14:06:51 +0200 Subject: [PATCH] Fix extremely slow page load for LNC import I noticed that the combination of ``` import { Form, PasswordInput, SubmitButton } from '@/components/form' ``` in components/wallet/lnc.js and the dynamic import via `await import` in components/wallet/index.js caused extremely slow page loads. --- components/wallet/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/wallet/index.js b/components/wallet/index.js index 740daeb4..c9c8df1c 100644 --- a/components/wallet/index.js +++ b/components/wallet/index.js @@ -4,13 +4,14 @@ import useLocalState from '@/components/use-local-state' import { useWalletLogger } from '@/components/wallet-logger' import { SSR } from '@/lib/constants' import { bolt11Tags } from '@/lib/bolt11' +import * as lnc from '@/components/wallet/lnc' // wallet definitions export const WALLET_DEFS = [ await import('@/components/wallet/lnbits'), - await import('@/components/wallet/nwc') + await import('@/components/wallet/nwc'), // FIXME: this doesn't break the build but it results in infinite page loads for some reason ... - // await import('@/components/wallet/lnc') + lnc ] export const Status = {