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

feat: add Help Icon to "Setup Wallet Connection" #106

Closed
wants to merge 2 commits into from

Conversation

kennym
Copy link

@kennym kennym commented Sep 11, 2024

Description

Show an info button that triggers a toast with instructions on how to connect to Alby Hub.

Context

Inspired because of #104

Screenshots

image

- Show an info toast with instructions on how to connect to Alby Hub
Comment on lines +25 to +26
const [isScanning, setIsScanning] = React.useState(false);
const [isConnecting, setIsConnecting] = React.useState(false);
Copy link
Author

Choose a reason for hiding this comment

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

this fixes react warning useState call is not destructured into value + setter pair

Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't seen this warning, weird. Do you know what plugin this is coming from?

import { errorToast } from "~/lib/errorToast";

import { nwc } from "@getalby/sdk";
import { Nip47Capability } from "@getalby/sdk/dist/NWCClient";
Copy link
Author

Choose a reason for hiding this comment

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

Sorry about these import order changes - I have prettier enabled by default.

Maybe we should add a .prettierrc in a separate PR?

Copy link
Author

Choose a reason for hiding this comment

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

There already is one, but it's pretty empty

Copy link
Contributor

Choose a reason for hiding this comment

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

It shouldn't matter if it's pretty empty - it should use prettier sane defaults. It was added recently though, and we didn't run a full format. We should do that. I will create a separate issue.

Comment on lines +15 to +22
info: (props: BaseToastProps) => (
<BaseToast
{...props}
text2NumberOfLines={2}
text1Style={{ fontSize: 16 }}
text2Style={{ fontSize: 14 }}
/>
),
Copy link
Author

Choose a reason for hiding this comment

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

I found the default text size for the info toast was unreadable, so I made it a little bit bigger.

@reneaaron
Copy link
Contributor

Thanks for the PR! Closing in favor like we discussed in #110 🙌

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.

3 participants