From ceabf94fb438efafc06b6343b88bab93511dfb8d Mon Sep 17 00:00:00 2001 From: bluecloud <96812901+pitb2022@users.noreply.github.com> Date: Wed, 8 Nov 2023 17:47:37 +0800 Subject: [PATCH] fix(Settings): add delay time to toast in Safari --- src/views/Me/Settings/Account/Socials/index.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/views/Me/Settings/Account/Socials/index.tsx b/src/views/Me/Settings/Account/Socials/index.tsx index 15bc1543ae..c1442ac8f1 100644 --- a/src/views/Me/Settings/Account/Socials/index.tsx +++ b/src/views/Me/Settings/Account/Socials/index.tsx @@ -11,6 +11,7 @@ import { import { // facebookOauthUrl, googleOauthUrl, + isSafari, sleep, storage, twitterOauthUrl, @@ -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({ @@ -106,7 +108,7 @@ const Socials = () => { /> ), }) - }) + }, delay) return } @@ -124,7 +126,7 @@ const Socials = () => { /> ), }) - }) + }, delay) return } @@ -139,7 +141,7 @@ const Socials = () => { /> ), }) - }) + }, delay) return } }, [])