Skip to content

Commit

Permalink
remove logout on settings upgrade (#5945)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbren authored Dec 31, 2024
1 parent e692e06 commit 7ae1f76
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions frontend/src/hooks/use-maybe-migrate-settings.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Sometimes we ship major changes, like a new default agent.

import React from "react";
import { useAuth } from "#/context/auth-context";
import { useSettingsUpToDate } from "#/context/settings-up-to-date-context";
import {
DEFAULT_SETTINGS,
Expand All @@ -12,7 +11,6 @@ import { useSaveSettings } from "./mutation/use-save-settings";

// In this case, we may want to override a previous choice made by the user.
export const useMaybeMigrateSettings = () => {
const { logout } = useAuth();
const { mutateAsync: saveSettings } = useSaveSettings();
const { isUpToDate } = useSettingsUpToDate();

Expand All @@ -35,7 +33,7 @@ export const useMaybeMigrateSettings = () => {
}

if (currentVersion < 4) {
logout();
// We used to log out here, but it's breaking things
}

// Only save settings if user already previously saved settings
Expand Down

0 comments on commit 7ae1f76

Please sign in to comment.