Update transition timing
This commit is contained in:
parent
883877b4e7
commit
9b6903853d
4 changed files with 5 additions and 20 deletions
|
|
@ -125,28 +125,11 @@ export function OnboardingContent({
|
||||||
<OnboardingStep
|
<OnboardingStep
|
||||||
isVisible={currentStep >= 2 && !isLoading && !!displayMessage}
|
isVisible={currentStep >= 2 && !isLoading && !!displayMessage}
|
||||||
isCompleted={currentStep > 2}
|
isCompleted={currentStep > 2}
|
||||||
text="Now, let's add your data."
|
text="Lastly, let's add your data."
|
||||||
hideIcon={true}
|
hideIcon={true}
|
||||||
>
|
>
|
||||||
<OnboardingUpload onComplete={handleStepComplete} />
|
<OnboardingUpload onComplete={handleStepComplete} />
|
||||||
</OnboardingStep>
|
</OnboardingStep>
|
||||||
|
|
||||||
{/* Step 4 */}
|
|
||||||
<OnboardingStep
|
|
||||||
isVisible={currentStep >= 3}
|
|
||||||
isCompleted={currentStep > 3}
|
|
||||||
text="Step 3: You're all set!"
|
|
||||||
>
|
|
||||||
<div className="space-y-4">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onClick={handleStepComplete}
|
|
||||||
className="px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90"
|
|
||||||
>
|
|
||||||
Go to Chat
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</OnboardingStep>
|
|
||||||
</div>
|
</div>
|
||||||
</StickToBottom.Content>
|
</StickToBottom.Content>
|
||||||
</StickToBottom>
|
</StickToBottom>
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,9 @@ const OnboardingUpload = ({ onComplete }: OnboardingUploadProps) => {
|
||||||
console.error("Upload failed", (error as Error).message);
|
console.error("Upload failed", (error as Error).message);
|
||||||
} finally {
|
} finally {
|
||||||
setIsUploading(false);
|
setIsUploading(false);
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||||
setCurrentStep(STEP_LIST.length);
|
setCurrentStep(STEP_LIST.length);
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 500));
|
||||||
onComplete();
|
onComplete();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ export function AnimatedProviderSteps({
|
||||||
if (currentStep < steps.length - 1) {
|
if (currentStep < steps.length - 1) {
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
setCurrentStep(currentStep + 1);
|
setCurrentStep(currentStep + 1);
|
||||||
}, 1000);
|
}, 1500);
|
||||||
return () => clearInterval(interval);
|
return () => clearInterval(interval);
|
||||||
}
|
}
|
||||||
}, [currentStep, setCurrentStep, steps]);
|
}, [currentStep, setCurrentStep, steps]);
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ export const UI_CONSTANTS = {
|
||||||
export const ANIMATION_DURATION = 0.4;
|
export const ANIMATION_DURATION = 0.4;
|
||||||
export const SIDEBAR_WIDTH = 280;
|
export const SIDEBAR_WIDTH = 280;
|
||||||
export const HEADER_HEIGHT = 54;
|
export const HEADER_HEIGHT = 54;
|
||||||
export const TOTAL_ONBOARDING_STEPS = 4;
|
export const TOTAL_ONBOARDING_STEPS = 3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Local Storage Keys
|
* Local Storage Keys
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue