summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/app.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/app.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/app.js b/packages/meshbay-hub/src/meshbay_hub/static/app.js
index 856a774..6b20a63 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/app.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/app.js
@@ -20,7 +20,7 @@ import {
} from './hub-client.js';
import { startIdleWatch, markActive } from './idle.js';
import { GroupPage } from './group-page.js';
-import { SearchPage } from './search-page.js';
+import { lazy } from './lazy.js';
import { ConnectionPool } from './connection-pool.js';
import { MusicPlayerBar } from './music-player.js';
import { NameModal } from './playlist-menu.js';
@@ -623,6 +623,13 @@ function SetupWelcome({ onDismiss }) {
</div>`;
}
+// ── Lazy-loaded Search page ──────────────────────────────────────────────────
+//
+// It renders every app's results, so importing it here would bring every app
+// into the first download.
+const SearchPage = lazy(() => import('./search-page.js'), 'SearchPage',
+ html`<div class="page-content"><p class="page-message"><span class="spinner"></span></p></div>`);
+
// ── Lazy-loaded Create Group page ────────────────────────────────────────────
let _CreateGroupPage = null;