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

24 lines
611 B
JavaScript
Raw Normal View History

import TabNavigation from '../ReusableComponents/TabNavigation';
import { getSettingsTabs } from './tabs';
import { useOnboardingStep } from '../../data';
import Onboarding from './Onboarding/Onboarding';
2024-10-24 13:54:50 +02:00
const Settings = () => {
const onboardingProgress = useOnboardingStep();
if ( ! onboardingProgress.isReady ) {
// TODO: Use better loading state indicator.
return <div>Loading...</div>;
}
if ( ! onboardingProgress.completed ) {
return <Onboarding />;
}
const tabs = getSettingsTabs( onboardingProgress );
2024-10-24 13:54:50 +02:00
return <TabNavigation tabs={ tabs }></TabNavigation>;
2024-10-24 13:54:50 +02:00
};
export default Settings;