Skip to content

closeRegisterModal(): Promise<void>

The closeRegisterModal is an asynchronous method that allows to close a modal with the register form inside.

Returned value

A returned value has a type of Promise<void> because of potential additional animations and transitions occurring while closing a modal.

Example

In this example we make a AuthenticationApi call to close a register modal.

useStorefront(async (storefront) => {
    const authenticationApi = await storefront.getApi('AuthenticationApi');

    await authenticationApi.closeRegisterModal();
});

Authentication API methods reference