woocommerce-paypal-payments/modules/ppcp-settings/resources/js/Components/Screens/Settings/index.js

22 lines
565 B
JavaScript
Raw Normal View History

2025-01-10 13:38:47 +01:00
import Container from '../../ReusableComponents/Container';
import SettingsNavigation from './Components/Navigation';
2025-01-28 08:59:06 +01:00
import { getSettingsTabs } from './Tabs';
2025-01-28 08:59:06 +01:00
const SettingsScreen = ( { activePanel, setActivePanel } ) => {
const tabs = getSettingsTabs();
2025-01-28 08:59:06 +01:00
const { Component } = tabs.find( ( tab ) => tab.name === activePanel );
return (
<>
2025-01-28 08:59:06 +01:00
<SettingsNavigation
tabs={ tabs }
activePanel={ activePanel }
setActivePanel={ setActivePanel }
/>
<Container page="settings">{ Component }</Container>
</>
);
};
export default SettingsScreen;