Skip to content

Focused Launch: Extract domain pre-selection logic to a (reusable) hook #50321

Open

Description

Why?

Our code must be comprehensible, maintainable, and reusable, hence we have to abstract the domain selection logic (see reference) to a (reusable) hook.

What?

Currently, the domain selection logic is contained in the <FocusedLaunch/> component.
Here, several checks are executed to comply with all the variants (e.g. when available, select the plan from the checkout cart, initially) to select the proper domain.

Reference

// @TODO: extract to some hook for reusability (Eg: use-products-from-cart)
// If there is no selected domain, but there is a domain in cart,
// set the domain from cart as the selected domain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions