check navigator.share exists before offering it

This commit is contained in:
ppc
2024-08-22 09:33:53 +01:00
parent cae2ec1090
commit 32a006e6d0
+1 -1
View File
@@ -201,7 +201,7 @@ function ServerCardInPage() {
className="flex flex-col-reverse sm:flex-row sm:flex-wrap justify-center sm:justify-between sm:gap-2 gap-4">
{server?.id && (
<div className="flex items-center justify-center sm:gap-5 gap-2">
{location.protocol === "https:" ? (
{location.protocol === "https:" && navigator.share ? (
<p className="text-sm text-blue-500" role="button"
onClick={() => navigator.share({url: shareUrl})}>
Share