diff --git a/client/src/Hooks/v1/settingsHooks.js b/client/src/Hooks/v1/settingsHooks.js index ac754ca69..f4a929e7f 100644 --- a/client/src/Hooks/v1/settingsHooks.js +++ b/client/src/Hooks/v1/settingsHooks.js @@ -57,13 +57,6 @@ const useSaveSettings = ({ } setSettingsData(settingsResponse.data.data); - // Update Redux state after successful save - if (typeof settings.showURL !== "undefined") { - const { setShowURL } = await import("../../Features/UI/uiSlice.js"); - const { default: store } = await import("../../store.js"); - store.dispatch(setShowURL(settings.showURL)); - } - createToast({ body: t("settingsSuccessSaved") }); } catch (error) { createToast({ body: t("settingsFailedToSave") }); diff --git a/client/src/Pages/v1/Settings/index.jsx b/client/src/Pages/v1/Settings/index.jsx index 926f2ce65..ea714c34a 100644 --- a/client/src/Pages/v1/Settings/index.jsx +++ b/client/src/Pages/v1/Settings/index.jsx @@ -168,6 +168,11 @@ const Settings = () => { } setSettingsData(newSettingsData); + + // Update Redux immediately for UI feedback + if (name === "showURL") { + dispatch(setShowURL(newValue ?? value)); + } }; const handleSave = () => {