refactor(web): update frontend toast call sites to use the new shortcut API (#33808)

Signed-off-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
yyh
2026-03-20 16:02:22 +08:00
committed by GitHub
parent ac87704685
commit 27ed40225d
75 changed files with 391 additions and 706 deletions

View File

@@ -48,7 +48,7 @@ const afterResponseErrorCode = (otherOptions: IOtherOptions): AfterResponseHook
const shouldNotifyError = response.status !== 401 && errorData && !otherOptions.silent
if (shouldNotifyError)
toast.add({ type: 'error', title: errorData.message })
toast.error(errorData.message)
if (response.status === 403 && errorData?.code === 'already_setup')
globalThis.location.href = `${globalThis.location.origin}/signin`