diff --git a/src/animations/TitleSite.js b/src/animations/TitleSite.js index 99fc616..98cafec 100644 --- a/src/animations/TitleSite.js +++ b/src/animations/TitleSite.js @@ -21,11 +21,11 @@ export const animateIn = (scope, init) => { }) // On scroll animation - const title = ScrollOut({ - once: true, - targets: scope, - onShown: () => { - requestAnimationFrame(() => letters.restart()) - } + requestAnimationFrame(() => { + const title = ScrollOut({ + once: true, + targets: scope, + onShown: () => requestAnimationFrame(() => letters.restart()) + }) }) }