2024-10-28 15:47:53 +01:00
|
|
|
import TabNavigation from '../ReusableComponents/TabNavigation';
|
2024-10-28 15:44:27 +01:00
|
|
|
import { getSettingsTabs } from './tabs';
|
2024-10-28 17:56:23 +01:00
|
|
|
import { useOnboardingStep } from '../../data';
|
|
|
|
import Onboarding from './Onboarding/Onboarding';
|
2024-10-24 13:54:50 +02:00
|
|
|
|
|
|
|
const Settings = () => {
|
2024-10-28 17:56:23 +01:00
|
|
|
const onboardingProgress = useOnboardingStep();
|
|
|
|
|
2024-10-28 18:57:39 +01:00
|
|
|
if ( ! onboardingProgress.isReady ) {
|
|
|
|
// TODO: Use better loading state indicator.
|
|
|
|
return <div>Loading...</div>;
|
|
|
|
}
|
|
|
|
|
2024-10-28 17:56:23 +01:00
|
|
|
if ( ! onboardingProgress.completed ) {
|
|
|
|
return <Onboarding />;
|
|
|
|
}
|
|
|
|
|
|
|
|
const tabs = getSettingsTabs( onboardingProgress );
|
2024-10-24 13:54:50 +02:00
|
|
|
|
2024-10-28 15:47:53 +01:00
|
|
|
return <TabNavigation tabs={ tabs }></TabNavigation>;
|
2024-10-24 13:54:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export default Settings;
|