Skip to content

Commit

Permalink
Button fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
codergautam committed Nov 8, 2024
1 parent b5073a4 commit 840f822
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion components/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -1830,11 +1830,19 @@ setShowCountryButtons(false)
<main className={`home`} id="main">
{ latLong && latLong?.lat && latLong?.long && legacyMapLoader ? (
<>
<iframe className={`streetview ${(loading || showAnswer) ? 'hidden' : ''} ${false ? 'multiplayer' : ''} ${gameOptions?.nmpz ? 'nmpz' : ''}`} src={`https://www.google.com/maps/embed/v1/streetview?location=${latLong.lat},${latLong.long}&key=AIzaSyA2fHNuyc768n9ZJLTrfbkWLNK3sLOK-iQ&fov=90&language=iw`} id="streetview" referrerPolicy='no-referrer-when-downgrade' allow='accelerometer; autoplay; clipboard-write; encrypted-media; picture-in-picture' onLoad={() => {
<iframe className={`streetview ${(loading) ? 'hidden' : ''} ${false ? 'multiplayer' : ''} ${gameOptions?.nmpz ? 'nmpz' : ''}`} src={`https://www.google.com/maps/embed/v1/streetview?location=${latLong.lat},${latLong.long}&key=AIzaSyA2fHNuyc768n9ZJLTrfbkWLNK3sLOK-iQ&fov=90&language=iw`} id="streetview" referrerPolicy='no-referrer-when-downgrade' allow='accelerometer; autoplay; clipboard-write; encrypted-media; picture-in-picture' onLoad={() => {

setTimeout(() => {
setLoading(false)

window.reloadLoc = () => {
const iframe = document.getElementById('streetview');
if (iframe) {
iframe.src = iframe.src; // Reload the iframe by resetting its src attribute
}
//
}

}, 500)
}}
style={{
Expand Down

0 comments on commit 840f822

Please sign in to comment.