简体   繁体   中英

My deployed CRA website on Github Pages seems to be not working as it is working on localhost on my machine when i was using VS Code

My deployed CRA website on Github Pages seems to be not working as it is working on localhost on my machine when i was using VS Code. Basically the site fetching some data from SWAPI and does some manipulations in various React components. It seems to be working just fine on my localhost. When I click on the very first button it brings up dropdowns for selecting spaceships for comparison, however when it is hosted on Github Pages, nothing happens when the button is clicked.

How it looks on localhost (second window loads on default and changes accordingly to settings in the first window): 本地主机屏幕

And here is a deployed version: 部署屏幕

Deployed site link: deployed site Github master branch: github

在此处输入图片说明

Try using https in the api fetch code

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM