Skip to content

Commit

Permalink
Merge pull request #3981 from thematters/fix/Social-login
Browse files Browse the repository at this point in the history
Fix/social login
  • Loading branch information
wlliaml authored Nov 8, 2023
2 parents 25bac39 + 2c368d1 commit 7f8d362
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/common/styles/mixins.css
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@

height: var(--input-height);
padding: var(--spacing-tight);
font-size: var(--font-size-md);
font-size: var(--font-size-sm);
line-height: 1.375rem;
color: var(--color-black);
background-color: var(--color-white);
Expand Down
9 changes: 1 addition & 8 deletions src/common/utils/form/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,7 @@ export const validatePaymentPointer = (value: string, lang: Language) => {
}

export const validateUserName = (value: string, lang: Language) => {
if (!value) {
return translate({ id: 'required', lang })
}

if (
value.length < MIN_USER_NAME_LENGTH ||
value.length > MAX_USER_NAME_LENGTH
) {
if (value.length > MAX_USER_NAME_LENGTH) {
return translate({
zh_hant: `ID 字符數須介於 ${MIN_USER_NAME_LENGTH}${MAX_USER_NAME_LENGTH} 之間`,
zh_hans: `ID 字符数须介于 ${MIN_USER_NAME_LENGTH}${MAX_USER_NAME_LENGTH} 之间`,
Expand Down
1 change: 0 additions & 1 deletion src/components/Dialogs/SetUserNameDialog/InputStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ const InputStep: React.FC<Props> = ({ userName, gotoConfirm }) => {
type="text"
// Why not use userName, userName will trigger auto fill feature in safari
name="mattersID"
required
autoFocus
placeholder={intl.formatMessage({
defaultMessage: 'English letters, numbers, and underscores',
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dialogs/SetUserNameDialog/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.atFlag {
display: inline-block;
padding-right: var(--spacing-xx-tight);
font-size: var(--font-size-md);
font-size: var(--font-size-sm);
line-height: 1.375rem;
color: var(--color-grey-light);
}
2 changes: 1 addition & 1 deletion src/components/Form/AmountInput/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
top: 0;
left: var(--spacing-base);
height: 100%;
font-size: var(--font-size-md);
font-size: var(--font-size-sm);
line-height: var(--input-height);
color: var(--color-black);
pointer-events: none;
Expand Down
8 changes: 5 additions & 3 deletions src/views/Me/Settings/Account/Socials/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
import {
// facebookOauthUrl,
googleOauthUrl,
isSafari,
sleep,
storage,
twitterOauthUrl,
Expand Down Expand Up @@ -92,6 +93,7 @@ const Socials = () => {
return
}
const state = bindResult.state
const delay = isSafari() ? 2 * 1000 : 0
if (state === OAUTH_STORAGE_BIND_STATE_SUCCESS) {
setTimeout(() => {
toast.success({
Expand All @@ -106,7 +108,7 @@ const Socials = () => {
/>
),
})
})
}, delay)
return
}

Expand All @@ -124,7 +126,7 @@ const Socials = () => {
/>
),
})
})
}, delay)
return
}

Expand All @@ -139,7 +141,7 @@ const Socials = () => {
/>
),
})
})
}, delay)
return
}
}, [])
Expand Down

1 comment on commit 7f8d362

@vercel
Copy link

@vercel vercel bot commented on 7f8d362 Nov 8, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.