Start integrating the onboarding flow with backend 10
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user