Start integrating the onboarding flow with backend 10

This commit is contained in:
Urtzi Alfaro
2025-09-06 19:40:47 +02:00
parent 905f848573
commit d2083856fa
16 changed files with 768 additions and 315 deletions

View File

@@ -68,19 +68,25 @@ const OnboardingPage: React.FC = () => {
}
};
const handleNext = () => {
return nextStep();
const handleNext = async (): Promise<boolean> => {
try {
const success = await nextStep();
return success;
} catch (error) {
console.error('Error in handleNext:', error);
return false;
}
};
const handlePrevious = () => {
const handlePrevious = (): boolean => {
return previousStep();
};
const handleComplete = async (allData: any) => {
const success = await completeOnboarding();
if (success) {
// Navigation is handled inside completeOnboarding
return;
const handleComplete = async (allData: any): Promise<void> => {
try {
await completeOnboarding();
} catch (error) {
console.error('Error in handleComplete:', error);
}
};