Problem in converting static website template to react project

I am new to reactjs. First, I will summarize what happened to me. When I tried to move to another page using useNavigate() in react-router-dom, some click events not fired in that page. But when refresh that page, javascript works well. I want to make react website(just look like using metronic static website template. So I added required css and js files in index.html file in public folder like below.