Skip to content

Commit

Permalink
Merge pull request #20 from Brillionfi/bugfix/change-error-message
Browse files Browse the repository at this point in the history
fix(): lint
  • Loading branch information
majid-allianceblock authored Dec 12, 2024
2 parents 4b215f9 + 9c1b68c commit 092c21d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ If you want to personalize this login form, you can easily put your own styles o
5) `buttonStyle?: React.CSSProperties;`
6) `buttonTextStyle?: React.CSSProperties;`
7) `buttonText?: string;`
8) `errorContainerStyle?: React.CSSProperties;`
9) `errorTextStyle?: React.CSSProperties;`

Note: you can leave some/all of these blank to have default styles

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brillionfi/waas-react-sdk",
"version": "1.0.18",
"version": "1.0.19",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
Expand Down
11 changes: 6 additions & 5 deletions src/components/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ export const LoginForm = ({loginMethods, redirectUrl, customProps}: {loginMethod
try {
const url = await login(provider, redirectUrl, email);
if (url) {
redirect ?
window.location.href = url
:
if(redirect){
window.location.href = url;
}else{
QRCodeModal.open(url, () => {});
}
}
} catch (error) {
setErrorText((error as Error).message);
Expand All @@ -44,15 +45,15 @@ export const LoginForm = ({loginMethods, redirectUrl, customProps}: {loginMethod
},
{
label: LoginMethods.Discord,
icon: <TwitterLogo />,
icon: <DiscordLogo />,
disabled: false,
onClick: async () => {
await makeLogin(AuthProvider.DISCORD, redirectUrl, true);
},
},
{
label: LoginMethods.Twitter,
icon: <DiscordLogo />,
icon: <TwitterLogo />,
disabled: false,
onClick: async () => {
await makeLogin(AuthProvider.TWITTER, redirectUrl, true);
Expand Down

0 comments on commit 092c21d

Please sign in to comment.