move js to component