Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/components/map/places-map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ export function PlacesMap({ places }: PlacesMapProps) {
lng: viewport?.lng ?? null,
zoom: viewport?.zoom ?? null,
});
if (!("clipboard" in navigator)) {
toast.error("Copying isn't supported in this browser");
return;
}
navigator.clipboard
.writeText(url)
.then(() => toast.success("Link copied"))
Expand Down
4 changes: 4 additions & 0 deletions src/components/pins/pin-popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export function PinPopup({ place }: PinPopupProps) {
lng: place.lng,
zoom: 15,
});
if (!("clipboard" in navigator)) {
toast.error("Copying isn't supported in this browser");
return;
}
navigator.clipboard
.writeText(url)
.then(() => toast.success("Link copied"))
Expand Down
Loading