mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-16 10:45:56 +08:00
fix: org name is fixed (#2810)
This commit is contained in:
parent
d2cdf401b8
commit
e73432df83
@ -14,7 +14,6 @@ const signup = async (
|
||||
const response = await axios.post(`/register`, {
|
||||
...props,
|
||||
});
|
||||
console.log(' response.data.data', response.data.data);
|
||||
return {
|
||||
statusCode: 200,
|
||||
error: null,
|
||||
|
@ -81,6 +81,13 @@ function SignUp({ version }: SignUpProps): JSX.Element {
|
||||
form.setFieldValue('organizationName', responseDetails.organization);
|
||||
setIsDetailsDisable(true);
|
||||
}
|
||||
}, [
|
||||
getInviteDetailsResponse.data?.payload,
|
||||
form,
|
||||
getInviteDetailsResponse.status,
|
||||
]);
|
||||
|
||||
useEffect(() => {
|
||||
if (
|
||||
getInviteDetailsResponse.status === 'success' &&
|
||||
getInviteDetailsResponse.data?.error
|
||||
@ -91,19 +98,19 @@ function SignUp({ version }: SignUpProps): JSX.Element {
|
||||
});
|
||||
}
|
||||
}, [
|
||||
getInviteDetailsResponse.data?.payload,
|
||||
getInviteDetailsResponse.data?.error,
|
||||
getInviteDetailsResponse.data,
|
||||
getInviteDetailsResponse.status,
|
||||
getInviteDetailsResponse,
|
||||
notifications,
|
||||
form,
|
||||
]);
|
||||
|
||||
const isPreferenceVisible = token === null;
|
||||
|
||||
const commonHandler = async (
|
||||
values: FormValues,
|
||||
callback: (e: SuccessResponse<PayloadProps>) => Promise<void> | VoidFunction,
|
||||
callback: (
|
||||
e: SuccessResponse<PayloadProps>,
|
||||
values: FormValues,
|
||||
) => Promise<void> | VoidFunction,
|
||||
): Promise<void> => {
|
||||
try {
|
||||
const { organizationName, password, firstName, email } = values;
|
||||
@ -129,7 +136,7 @@ function SignUp({ version }: SignUpProps): JSX.Element {
|
||||
payload.refreshJwt,
|
||||
);
|
||||
if (userResponse) {
|
||||
callback(userResponse);
|
||||
callback(userResponse, values);
|
||||
}
|
||||
} else {
|
||||
notifications.error({
|
||||
@ -150,16 +157,12 @@ function SignUp({ version }: SignUpProps): JSX.Element {
|
||||
|
||||
const onAdminAfterLogin = async (
|
||||
userResponse: SuccessResponse<PayloadProps>,
|
||||
values: FormValues,
|
||||
): Promise<void> => {
|
||||
const {
|
||||
organizationName,
|
||||
isAnonymous,
|
||||
hasOptedUpdates,
|
||||
} = form.getFieldsValue();
|
||||
const editResponse = await editOrg({
|
||||
isAnonymous,
|
||||
name: organizationName,
|
||||
hasOptedUpdates,
|
||||
isAnonymous: values.isAnonymous,
|
||||
name: values.organizationName,
|
||||
hasOptedUpdates: values.hasOptedUpdates,
|
||||
orgId: userResponse.payload.orgId,
|
||||
});
|
||||
if (editResponse.statusCode === 200) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user