-
+
{hero?.titleIntro}
-
- {hero?.titleMain}
-
+ {hero?.titleMain}
- {hero?.titleOutro}
+
+ {hero?.titleOutro}
+
{hero?.subFirst}
diff --git a/components/ProgressBar.tsx b/components/ProgressBar.tsx
index 69aedbe..e521b27 100644
--- a/components/ProgressBar.tsx
+++ b/components/ProgressBar.tsx
@@ -29,7 +29,7 @@ export function ProgressBar({ onComplete }: ProgressBarProps) {
} else {
setTimeout(() => {
setVisible(false);
- onComplete(); // Appeler la fonction de complétion ici
+ onComplete();
}, 200);
}
};
@@ -42,7 +42,7 @@ export function ProgressBar({ onComplete }: ProgressBarProps) {
return () => {
cancelAnimationFrame(animationFrameId);
};
- }, [onComplete]); // Ajoutez onComplete comme dépendance
+ }, [onComplete]);
return (
visible && (
diff --git a/context/LoaderContext.tsx b/context/LoaderContext.tsx
index d694532..e1875fd 100644
--- a/context/LoaderContext.tsx
+++ b/context/LoaderContext.tsx
@@ -20,15 +20,19 @@ export const useLoader = (): LoaderContextType => {
export const LoaderProvider = ({ children }: { children: ReactNode }) => {
const [isLoading, setIsLoading] = useState(false);
+ const [hasLoaded, setHasLoaded] = useState(false);
const showLoader = () => {
- setIsLoading(true);
+ if (!hasLoaded) {
+ setIsLoading(true);
+ }
};
const hideLoader = () => {
const timeout = setTimeout(() => {
setIsLoading(false);
- }, 1500);
+ setHasLoaded(true);
+ }, 2000);
return () => clearTimeout(timeout);
};