Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

fix: Notification is shown to the user when api for login is not successfull (#361)

pal-sig865e487fc35e
diff --git a/frontend/src/pages/SignUp/index.tsx b/frontend/src/pages/SignUp/index.tsx
index e451850aad..999f02bede 100644
--- a/frontend/src/pages/SignUp/index.tsx
+++ b/frontend/src/pages/SignUp/index.tsx
@@ -1,4 +1,4 @@
-import { Button, Input, Typography } from 'antd';
+import { Button, Input, notification, Typography } from 'antd';
import signup from 'api/user/signup';
import ROUTES from 'constants/routes';
import history from 'lib/history';
@@ -18,6 +18,8 @@ import {
} from './styles';
const Signup = ({ loggedIn }: SignupProps): JSX.Element => {
+ const [notificationsInstance, Element] = notification.useNotification();
+
const [state, setState] = useState({ submitted: false });
const [formState, setFormState] = useState({
firstName: { value: '' },
@@ -61,17 +63,22 @@ const Signup = ({ loggedIn }: SignupProps): JSX.Element => {
loggedIn();
history.push(ROUTES.APPLICATION);
} else {
- // @TODO throw a error notification here
+ notificationsInstance.error({
+ message: 'Something went wrong',
+ });
}
} catch (error) {
- console.error(error);
- // @TODO throw a error notification here
+ notificationsInstance.error({
+ message: 'Something went wrong',
+ });
}
})();
};
return (
<div>
+ {Element}
+
<Container direction="vertical">
<Title>Create your account</Title>
<Typography>