All files / realm/blong-party/browser/orchestrator/component selfRegistration.ts

0% Statements 0/22
0% Branches 0/1
0% Functions 0/1
0% Lines 0/22

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23                                             
import {handler} from '@feasibleone/blong';

/**
 * The self-registration page, loaded when the portal opens it.
 *
 * Importing the page from this registration — rather than at the top of the module —
 * is what keeps the browser library out of the login screen. `selfRegistrationPage.tsx`
 * imports `SelfRegistration` and `useBlong` from the package root, and a dev server does
 * not tree-shake, so one static import here made every app that mounts `party` fetch
 * every widget, viewer, editor and test-run module before the login form could paint:
 * blong-sport's login screen fetched 478 scripts and 11.5 MB, against 272 scripts for an
 * app that does not mount this realm. A registration is already a factory — the portal
 * awaits `component()` — so the import belongs inside it (`@@D-747`).
 */
export default handler(function userRegistration() {
    return {
        'user.selfRegistration': async () => ({
            title: 'Register',
            component: async () => (await import('./selfRegistrationPage.js')).SelfRegistrationPage,
        }),
    };
});