mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
fix(server): signup/signin logic (#4008)
This commit is contained in:
@@ -21,6 +21,8 @@ function validateEmail(email: string) {
|
||||
return emailRegex.test(email);
|
||||
}
|
||||
|
||||
const INTERNAL_BETA_URL = `https://community.affine.pro/c/insider-general/`;
|
||||
|
||||
function handleSendEmailError(
|
||||
res: SignInResponse | undefined,
|
||||
pushNotification: (notification: Notification) => void
|
||||
@@ -32,6 +34,13 @@ function handleSendEmailError(
|
||||
type: 'error',
|
||||
});
|
||||
}
|
||||
if (res?.status === 403 && res?.url === INTERNAL_BETA_URL) {
|
||||
pushNotification({
|
||||
title: 'Sign up error',
|
||||
message: `You don't have early access permission\nVisit ${INTERNAL_BETA_URL} for more information`,
|
||||
type: 'error',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export const SignIn: FC<AuthPanelProps> = ({
|
||||
|
||||
Reference in New Issue
Block a user