Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
huggingchat
/
chat-ui
like
1.09k
Running
App
Files
Files
Community
607
6805015
chat-ui
/
src
/
lib
/
utils
/
share.ts
Mishig
Update share behaviour (#645)
c208e39
unverified
10 months ago
raw
Copy download link
history
blame
Safe
176 Bytes
export
async
function
share
(
url:
string
, title:
string
) {
if
(navigator.
share
) {
navigator.
share
({ url, title });
}
else
{
await
navigator.
clipboard
.
writeText
(url);
}
}