feat: share list
TS Lint / TypeScript (push) Successful in 6m0s
TS Lint / ESLint (push) Successful in 6m0s
TS Lint / Oxlint (push) Successful in 6m0s

This commit is contained in:
2026-07-14 14:49:22 +02:00
parent 79e48090fb
commit 84630f2049
7 changed files with 50 additions and 9 deletions
+16
View File
@@ -0,0 +1,16 @@
export async function shareLink(
title: string,
text: string,
url: string,
): Promise<boolean> {
try {
if (navigator.canShare()) {
await navigator.share({ title, text, url });
return true;
}
} catch {
// do nothing
}
await navigator.clipboard.writeText(url);
return false;
}