decentraland / decentraland/ui2

Change JumpIn component behavior

Open
#284 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
TypeScript
Stars
0
Forks
2
Avg merge
2h 1m
Merged PRs (30d)
10

Description

The current behavior of the `JumpIn` component in UI2 (`src/components/JumpIn/JumpIn.tsx`) is to display a modal when the launcher is not installed:

```ts
if (!hasLauncher) {
setIsModalOpen(true)
}
```
Problem

Showing the modal in this case is not the expected behavior and results in an inconsistent user experience compared to the landing.

Expected behavior

The component should not open a modal when the launcher is missing.
Instead, it should receive a new property isSignedIn and change its behavior accordingly:

```ts
if (isSignedIn) {
window.open(downloadUrl, '_self')
} else {
window.open(onboardingUrl, '_self')
}
```

Proposed changes
- Add a new prop to JumpIn called isSignedIn.
- Remove the modal logic tied to !hasLauncher.
- Implement the conditional flow based on isSignedIn:
- If true, redirect to downloadUrl.
- If false, redirect to onboardingUrl.

Expected outcome

The JumpIn component will no longer show a modal when the launcher is not present.
Instead, it will handle the user flow directly based on the isSignedIn property, ensuring consistency across dapps.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.