Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fix: alert bug

kruzhambusd4f3378ead3d
diff --git a/src/pages/UserSettings/UserSettings.container.tsx b/src/pages/UserSettings/UserSettings.container.tsx
index 8233beaa6..42d31c051 100644
--- a/src/pages/UserSettings/UserSettings.container.tsx
+++ b/src/pages/UserSettings/UserSettings.container.tsx
@@ -53,6 +53,7 @@ const mapDispatchToProps = (dispatch: AppDispatch) => ({
userSharedUpdate: (message: string) => {
dispatch(alertsActions.userSharedUpdate({
message,
+ type: 'success',
}))
},
sharedProjectError: (message: string) => {
@@ -95,6 +96,7 @@ const mapDispatchToProps = (dispatch: AppDispatch) => ({
accountUpdated: (message: string) => {
dispatch(alertsActions.accountUpdated({
message,
+ type: 'success',
}))
},
updateUserProfileAsync: (data: Partial<IUser>, successMessage: string, callback = (e: any) => {}) => {
@@ -106,6 +108,7 @@ const mapDispatchToProps = (dispatch: AppDispatch) => ({
dispatch(
alertsActions.accountUpdated({
message: successMessage,
+ type: 'success',
}),
)
}
diff --git a/src/pages/UserSettings/UserSettings.tsx b/src/pages/UserSettings/UserSettings.tsx
index 3207038e6..75fcf3204 100644
--- a/src/pages/UserSettings/UserSettings.tsx
+++ b/src/pages/UserSettings/UserSettings.tsx
@@ -62,7 +62,7 @@ interface IProps {
genericError: (message: string) => void,
onGDPRExportFailed: (message: string) => void,
updateProfileFailed: (message: string) => void,
- updateUserProfileAsync: (data: IUser, onSuccess: () => void, onError: () => void) => void,
+ updateUserProfileAsync: (data: IUser, successMessage: string, callback?: (e: any) => {}) => void,
accountUpdated: (t: string) => void,
setAPIKey: (key: string | null) => void,
user: IUser,
@@ -150,7 +150,7 @@ const UserSettings = ({
}
}
- updateUserProfileAsync(data, () => t('profileSettings.updated'), callback)
+ updateUserProfileAsync(data, t('profileSettings.updated'))
}
useEffect(() => {