Infinite hits on next js static page

Looking for some help or examples regarding displaying infinite hits on a static-generated next js page.

My page refreshes when I attempted to display infinite hits