Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new text for connect wallet button tooltip #1450

Merged
merged 3 commits into from
Dec 26, 2023

Conversation

maxaleks
Copy link
Contributor

Resolves #1431

const label = isAppPage ?
<span>Connect once to use your wallet with<br/>all apps in the DAppscout marketplace!</span> :
defaultLabel;
const localStorageKey = `${ isAppPage ? 'dapp-' : '' }wallet-connect-tooltip-shown-${ isMobile ? 'mobile' : 'desktop' }`;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why there are separate keys for mobile and desktop devices. It seems unnecessary since user sessions and data cannot be shared between the two.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that both components are rendered at the same time, and if you use 1 key, only the tooltip for one of the device types will be displayed. I tried using Show/Hide components, but the result was even worse, because the button itself appeared with a delay. If you have an idea, I'm ready to redo it, because I don't really like this solution myself

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see now. Then, maybe the parent component should pass isDisabled=true prop if viewport size doesn't match. Will it work?

@tom2drum tom2drum merged commit 3504d59 into main Dec 26, 2023
6 checks passed
@tom2drum tom2drum deleted the new-tooltip-for-connect-wallet-button branch December 26, 2023 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the banner for connect wallet button
2 participants