From 3122bd2e89e66f29f6eb33547e14b2dbb9794e8f Mon Sep 17 00:00:00 2001 From: Palanikannan M Date: Mon, 13 Jan 2025 19:31:50 +0530 Subject: [PATCH] temp: remove later, workaround in store --- web/core/store/user/profile.store.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web/core/store/user/profile.store.ts b/web/core/store/user/profile.store.ts index 9537da7da3..865b35ec3c 100644 --- a/web/core/store/user/profile.store.ts +++ b/web/core/store/user/profile.store.ts @@ -50,6 +50,7 @@ export class ProfileStore implements IUserProfileStore { workspace_create: false, workspace_invite: false, }, + has_enabled_smooth_cursor: true, is_onboarded: false, is_tour_completed: false, use_case: undefined, @@ -101,7 +102,8 @@ export class ProfileStore implements IUserProfileStore { const userProfile = await this.userService.getCurrentUserProfile(); runInAction(() => { this.isLoading = false; - this.data = userProfile; + this.mutateUserProfile(userProfile); + // this.data = userProfile; }); return userProfile; } catch (error) { @@ -127,7 +129,7 @@ export class ProfileStore implements IUserProfileStore { if (currentUserProfileData) { this.mutateUserProfile(data); } - const userProfile = await this.userService.updateCurrentUserProfile(data); + // const userProfile = await this.userService.updateCurrentUserProfile(data); return userProfile; } catch { if (currentUserProfileData) { @@ -169,7 +171,6 @@ export class ProfileStore implements IUserProfileStore { runInAction(() => { this.mutateUserProfile({ ...dataToUpdate, is_onboarded: true }); }); - } catch (error) { runInAction(() => { this.error = { @@ -179,7 +180,7 @@ export class ProfileStore implements IUserProfileStore { }); throw error; } - } + }; /** * @description updates the user tour completed status