fix: move js to separate files to avoid multiple trigger