fix unmount logic edgecases

This commit is contained in:
chrisk325 2026-03-06 13:21:47 +05:30 committed by GitHub
parent b89c5b7b4f
commit b40d45cbcb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1140,10 +1140,12 @@ const HeroSection: React.FC<HeroSectionProps> = memo(({
return;
}
setTrailerUrl(null);
setTrailerLoading(true);
setTrailerError(false);
setTrailerReady(false);
setTrailerPreloaded(false);
startedOnReadyRef.current = false;
// Small delay to avoid blocking the UI render
timerId = setTimeout(async () => {