Something went wrong. Try again.
grain.social is a photo sharing platform built on atproto. grain.social
appview atproto photography
Something went wrong. Try again.
12345678910111213141516171819202122export async function share( url: string,): Promise<{ success: boolean; method: "share" | "clipboard" }> { if (navigator.share) { try { await navigator.share({ url }); return { success: true, method: "share" }; } catch (err: any) { if (err.name === "AbortError") { return { success: false, method: "share" }; } } }
try { await navigator.clipboard.writeText(url); return { success: true, method: "clipboard" }; } catch { return { success: false, method: "clipboard" }; }}