Skip to content

Commit

Permalink
fix(Settings): add delay time to toast in Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
wlliaml committed Nov 8, 2023
1 parent c105ece commit ceabf94
Showing 1 changed file with 5 additions and 3 deletions.
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

0 comments on commit ceabf94

Please sign in to comment.