Run page animations onMount instead of browser

This commit is contained in:
2022-05-30 21:57:04 +02:00
parent 7a165721d9
commit d3f74be59e
8 changed files with 279 additions and 347 deletions

View File

@@ -113,7 +113,7 @@ export const getRandomElement = (array: any[]): any => {
/**
* Get a DOM element's position
*/
export const getPosition = (node, scope?: HTMLElement) => {
export const getPosition = (node: any, scope?: HTMLElement) => {
const root = scope || document
let offsetTop = node.offsetTop
let offsetLeft = node.offsetLeft