Skip to content

Commit

Permalink
small nit
Browse files Browse the repository at this point in the history
  • Loading branch information
pablonyx committed Nov 28, 2024
1 parent a3ce8b6 commit 45244d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion web/src/components/user/UserProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@ export function UserProvider({
});
setUpToDateUser((prevUser) => {
if (prevUser) {
return { ...prevUser, auto_scroll: autoScroll };
return {
...prevUser,
preferences: {
...prevUser.preferences,
auto_scroll: autoScroll,
},
};
}
return prevUser;
});
Expand Down
2 changes: 1 addition & 1 deletion web/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface UserPreferences {
hidden_assistants: number[];
default_model: string | null;
recent_assistants: number[];
auto_scroll: boolean;
auto_scroll: boolean | null;
}

export enum UserStatus {
Expand Down

0 comments on commit 45244d8

Please sign in to comment.