@AhmadmustSubmitted over 1 year ago
Avitohol_
@Avitohol1All comments
- @Avitohol1Posted over 1 year ago
Nice job! When you click one of the border countries or reload the page, the dark theme is reset to light. Maybe use local storage to persist the theme whenever the page reloads?
0 - @Swierszczu2Submitted over 1 year ago@Avitohol1Posted over 1 year ago
Hi and congrats for completing the challenge! Here are some things I hope will be helpful for you:
- In the HTML I recommend you use a
<button type="submit"> > </button>
in place of the submit input you currently have. The button is more explicit. - There is no responsiveness to your design - you can use media queries for that.
- On line 11 there is a typo for the second argument of fetch. But you can actually remove the argument completely as the default method for fetch is "GET" - like this:
const response = await fetch(url)
- In the app.js when you call the updateMap() function you are creating a new map on every call. So every time when you click the submit button a new map is added on top of the old one and this is ineffective and also you can't drag the new map. A way to fix this would be to initialize the map once in the beginning of your code and then use the map.panTo() method
Marked as helpful0 - In the HTML I recommend you use a
- @CarlTeclancingSubmitted about 2 years ago
i need help on how to host react apps on github pages someone help me please😢
@Avitohol1Posted about 2 years agoHi there - I saw from your package.json that you have installed gh-pages. Did you run npm run deploy and if so are there any errors that show up? Anyways this is my process on publishing to gh-pages:
- Install gh-pages (npm install gh-pages --save-dev)
- Create github repository
- git add .
- git commit -m 'first commit'
- git branch -M main
- git remote add origin https://github.com/{your_username}/{your_repo}.git
- git push -u origin master
- npm run deploy
Also, make sure you have the correct homepage in package.json Hope this helps!
Marked as helpful0