Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(core): adjust notify style (#6724)

EYHN704532bd2fac
diff --git a/packages/frontend/core/src/components/affine/auth/after-sign-in-send-email.tsx b/packages/frontend/core/src/components/affine/auth/after-sign-in-send-email.tsx
index 6ef04e22da..17e89bcabd 100644
--- a/packages/frontend/core/src/components/affine/auth/after-sign-in-send-email.tsx
+++ b/packages/frontend/core/src/components/affine/auth/after-sign-in-send-email.tsx
@@ -64,7 +64,7 @@ export const AfterSignInSendEmail = ({
} catch (err) {
console.error(err);
notify.error({
- message: 'Failed to send email, please try again.',
+ title: 'Failed to send email, please try again.',
});
}
setIsSending(false);
diff --git a/packages/frontend/core/src/components/affine/auth/after-sign-up-send-email.tsx b/packages/frontend/core/src/components/affine/auth/after-sign-up-send-email.tsx
index 406e4e2b0d..a8cc366601 100644
--- a/packages/frontend/core/src/components/affine/auth/after-sign-up-send-email.tsx
+++ b/packages/frontend/core/src/components/affine/auth/after-sign-up-send-email.tsx
@@ -64,7 +64,7 @@ export const AfterSignUpSendEmail: FC<AuthPanelProps> = ({
} catch (err) {
console.error(err);
notify.error({
- message: 'Failed to send email, please try again.',
+ title: 'Failed to send email, please try again.',
});
}
setIsSending(false);
diff --git a/packages/frontend/core/src/components/affine/auth/oauth.tsx b/packages/frontend/core/src/components/affine/auth/oauth.tsx
index 9ca5f84e77..848a4b9efc 100644
--- a/packages/frontend/core/src/components/affine/auth/oauth.tsx
+++ b/packages/frontend/core/src/components/affine/auth/oauth.tsx
@@ -67,7 +67,7 @@ function OAuthProvider({
await authService.signInOauth(provider, redirectUri);
} catch (err) {
console.error(err);
- notify.error({ message: 'Failed to sign in, please try again.' });
+ notify.error({ title: 'Failed to sign in, please try again.' });
} finally {
setIsConnecting(false);
mixpanel.track('OAuth', { provider });
diff --git a/packages/frontend/core/src/components/affine/auth/sign-in-with-password.tsx b/packages/frontend/core/src/components/affine/auth/sign-in-with-password.tsx
index 1ef014fc40..6f12fa0c34 100644
--- a/packages/frontend/core/src/components/affine/auth/sign-in-with-password.tsx
+++ b/packages/frontend/core/src/components/affine/auth/sign-in-with-password.tsx
@@ -60,7 +60,7 @@ export const SignInWithPassword: FC<AuthPanelProps> = ({
} catch (err) {
console.error(err);
notify.error({
- message: 'Failed to send email, please try again.',
+ title: 'Failed to send email, please try again.',
});
// TODO: handle error better
}
diff --git a/packages/frontend/core/src/components/affine/auth/sign-in.tsx b/packages/frontend/core/src/components/affine/auth/sign-in.tsx
index 6e05efd048..665250e754 100644
--- a/packages/frontend/core/src/components/affine/auth/sign-in.tsx
+++ b/packages/frontend/core/src/components/affine/auth/sign-in.tsx
@@ -101,7 +101,7 @@ export const SignIn: FC<AuthPanelProps> = ({
// TODO: better error handling
notify.error({
- message: 'Failed to send email. Please try again.',
+ title: 'Failed to send email. Please try again.',
});
}
diff --git a/packages/frontend/core/src/providers/modal-provider.tsx b/packages/frontend/core/src/providers/modal-provider.tsx
index 0de5b078b1..fcb521ffeb 100644
--- a/packages/frontend/core/src/providers/modal-provider.tsx
+++ b/packages/frontend/core/src/providers/modal-provider.tsx
@@ -233,9 +233,8 @@ export const SignOutConfirmModal = () => {
} catch (err) {
console.error(err);
// TODO: i18n
- notify({
- style: 'alert',
- message: 'Failed to sign out',
+ notify.error({
+ title: 'Failed to sign out',
});
}