2024-12-08 09:33:49 +01:00
|
|
|
import ConnectionStatus from './TabSettingsElements/ConnectionStatus';
|
2024-11-11 14:02:49 +01:00
|
|
|
import CommonSettings from './TabSettingsElements/CommonSettings';
|
|
|
|
import ExpertSettings from './TabSettingsElements/ExpertSettings';
|
2025-01-17 13:59:17 +01:00
|
|
|
import { useSettings } from '../../../data/settings-tab/hooks';
|
2024-11-11 14:02:49 +01:00
|
|
|
|
2024-10-25 14:35:16 +02:00
|
|
|
const TabSettings = () => {
|
2025-01-17 13:59:17 +01:00
|
|
|
const { settings, setSettings } = useSettings();
|
|
|
|
|
2024-11-11 14:02:49 +01:00
|
|
|
const updateFormValue = ( key, value ) => {
|
2025-01-17 13:59:17 +01:00
|
|
|
setSettings( {
|
|
|
|
...settings,
|
|
|
|
[ key ]: value,
|
|
|
|
} );
|
2024-11-11 14:02:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<div className="ppcp-r-settings">
|
2024-12-08 09:33:49 +01:00
|
|
|
<ConnectionStatus />
|
2024-11-11 14:02:49 +01:00
|
|
|
<CommonSettings
|
|
|
|
settings={ settings }
|
|
|
|
updateFormValue={ updateFormValue }
|
|
|
|
/>
|
|
|
|
<ExpertSettings
|
|
|
|
settings={ settings }
|
|
|
|
updateFormValue={ updateFormValue }
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
);
|
2024-10-25 14:35:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export default TabSettings;
|