{"version":3,"file":"useOnComponentDidMount-CmuTWiOl.js","sources":["../../../../../../../../app/frontend/shared/models/hooks/useOnComponentDidMount.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react'\n\nexport const useOnComponentDidMount = (effect: (...args: T[]) => R) => {\n const componentDidMount = useRef(false)\n\n useEffect(() => {\n if (!componentDidMount.current) {\n effect()\n }\n }, [effect])\n\n useEffect(() => {\n componentDidMount.current = true\n }, [])\n}\n"],"names":["useOnComponentDidMount","effect","componentDidMount","useRef","useEffect"],"mappings":"sDAEa,MAAAA,EAAgCC,GAAgC,CACrE,MAAAC,EAAoBC,SAAO,EAAK,EAEtCC,EAAAA,UAAU,IAAM,CACTF,EAAkB,SACdD,GACT,EACC,CAACA,CAAM,CAAC,EAEXG,EAAAA,UAAU,IAAM,CACdF,EAAkB,QAAU,EAC9B,EAAG,CAAE,CAAA,CACP"}