mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 16:04:23 +00:00
Refactor type definitions in AuthenticatedContent and App components
This commit is contained in:
@@ -47,7 +47,7 @@ function settingsReducer(
|
||||
initialSettings: action.payload || {},
|
||||
hasUnsavedChanges: false,
|
||||
};
|
||||
case SettingsActionType.UPDATE_LOCAL_SETTINGS:
|
||||
case SettingsActionType.UPDATE_LOCAL_SETTINGS: {
|
||||
const newLocalSettings = { ...state.localSettings, ...action.payload };
|
||||
const hasChanges =
|
||||
JSON.stringify(newLocalSettings) !==
|
||||
@@ -57,6 +57,7 @@ function settingsReducer(
|
||||
localSettings: newLocalSettings,
|
||||
hasUnsavedChanges: hasChanges,
|
||||
};
|
||||
}
|
||||
case SettingsActionType.MARK_SAVED:
|
||||
return {
|
||||
...state,
|
||||
@@ -254,7 +255,7 @@ const AccountSettings: React.FC<AccountSettingsProps> = ({
|
||||
Cancel
|
||||
</Button>
|
||||
<Button
|
||||
onClick={handleSubmit}
|
||||
onClick={() => void handleSubmit}
|
||||
loading={loading}
|
||||
disabled={!state.hasUnsavedChanges}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user