complete 이후 자동으로 next 호출 변경 .

main
hbyang 2025-12-30 15:56:20 +09:00
parent cf3a9dd993
commit 879cd7d10c
1 changed files with 11 additions and 0 deletions

View File

@ -135,6 +135,17 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
}; };
}, [isLanguageDropdownOpen]); }, [isLanguageDropdownOpen]);
// Auto-navigate to next page when video generation is complete
useEffect(() => {
if (videoGenerationStatus === 'complete' && songTaskId) {
// Wait a brief moment to show 100% completion before navigating
const timer = setTimeout(() => {
onNext(songTaskId);
}, 500);
return () => clearTimeout(timer);
}
}, [videoGenerationStatus, songTaskId, onNext]);
const resumePolling = async (taskId: string, sunoTaskId: string, currentLyrics: string, currentRetryCount: number = 0) => { const resumePolling = async (taskId: string, sunoTaskId: string, currentLyrics: string, currentRetryCount: number = 0) => {
try { try {
const downloadResponse = await waitForSongComplete( const downloadResponse = await waitForSongComplete(