Refactor type definitions in AuthenticatedContent and App components

This commit is contained in:
2025-05-23 23:48:45 +02:00
parent 623f619f88
commit e43efc736a
2 changed files with 5 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ import '@mantine/core/styles.css';
import '@mantine/notifications/styles.css';
import './App.scss';
interface AuthenticatedContentProps {}
type AuthenticatedContentProps = object;
const AuthenticatedContent: React.FC<AuthenticatedContentProps> = () => {
const { user, loading, initialized } = useAuth();
@@ -37,7 +37,7 @@ const AuthenticatedContent: React.FC<AuthenticatedContentProps> = () => {
);
};
interface AppProps {}
type AppProps = object;
const App: React.FC<AppProps> = () => {
return (

View File

@@ -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}
>