“Navbar refers to a value, but is being used as a type here” when trying to render a shallow copy of my component when testing

Have you tried to change the name of the file? MyComponent.test.tsx Also, did you install the types of jest and stuff npm i -D @types/jest. I mean I’m saying this because if you look at the jest config where it says testRegex. You have it like this __tests__/*.(test|spec).tsx the test must be inside a tests …

Read more

Google maps API – Center map on client’s current location

Try using the below code to get the user’s current location (GEOLOCATION): if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function (position) { initialLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); map.setCenter(initialLocation); }); } For showing an example, I’ve removed your php code. Check this JSFiddle Hope you understand.