Next Js Typescript Array Length Jquery