diff --git a/client/constants/index.ts b/client/constants/index.ts
index e6a9db1b..97e56ff8 100644
--- a/client/constants/index.ts
+++ b/client/constants/index.ts
@@ -17,3 +17,7 @@ export const REDDIT_URL = 'https://www.reddit.com/r/reactiveresume/';
export const GITHUB_URL = 'https://github.com/AmruthPillai/Reactive-Resume';
export const PRODUCT_HUNT_URL = 'https://www.producthunt.com/posts/reactive-resume-v3';
export const GITHUB_ISSUES_URL = 'https://github.com/AmruthPillai/Reactive-Resume/issues/new/choose';
+
+// Default Error Message
+export const DEFAULT_ERROR_MESSAGE =
+ 'Something went wrong while performing this action, please report this issue on GitHub.';
diff --git a/client/modals/auth/LoginModal.tsx b/client/modals/auth/LoginModal.tsx
index a2b9d7dc..bdd90d79 100644
--- a/client/modals/auth/LoginModal.tsx
+++ b/client/modals/auth/LoginModal.tsx
@@ -62,14 +62,7 @@ const LoginModal: React.FC = () => {
};
const onSubmit = async ({ identifier, password }: FormData) => {
- await loginMutation(
- { identifier, password },
- {
- onError: (error) => {
- toast.error(error.message);
- },
- }
- );
+ await loginMutation({ identifier, password });
handleClose();
};
@@ -86,14 +79,14 @@ const LoginModal: React.FC = () => {
const handleLoginWithGoogle = async (response: CredentialResponse) => {
if (response.credential) {
- await loginWithGoogleMutation({ credential: response.credential }, { onError: handleLoginWithGoogleError });
+ await loginWithGoogleMutation({ credential: response.credential }, { onError: handleGoogleLoginError });
handleClose();
}
};
- const handleLoginWithGoogleError = () => {
- toast("Please try logging in using email/password, or use another browser that supports Google's One Tap API.");
+ const handleGoogleLoginError = () => {
+ toast.error("Google doesn't seem to be responding, please try logging in using email/password instead.");
};
const PasswordVisibility = (): React.ReactElement => {
@@ -117,7 +110,7 @@ const LoginModal: React.FC = () => {
footerChildren={
{!isEmpty(env('GOOGLE_CLIENT_ID')) && (
-
+
)}