Aaaaaa
This commit is contained in:
parent
8df7a8da6f
commit
ca7f46667d
|
@ -1,7 +1,7 @@
|
|||
# hello wordl
|
||||
It's [Wordle](https://www.powerlanguage.co.uk/wordle/) but you can play forever!
|
||||
|
||||
Play it [here](http://foldr.moe/hello-wordl/).
|
||||
Play it [here](https://foldr.moe/hello-wordl/).
|
||||
|
||||
## Introduction
|
||||
Wordle is a word game similar to the TV show [Lingo](https://en.wikipedia.org/wiki/Lingo_(British_game_show)).
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "wordl",
|
||||
"version": "0.1.0",
|
||||
"homepage": "https://lynn.github.io/hello-wordl",
|
||||
"homepage": "http://hellowordl.net/",
|
||||
"private": false,
|
||||
"dependencies": {
|
||||
"@testing-library/jest-dom": "^5.16.1",
|
||||
|
|
15
src/Game.tsx
15
src/Game.tsx
|
@ -234,8 +234,19 @@ function Game(props: GameProps) {
|
|||
<p>
|
||||
<button
|
||||
onClick={() => {
|
||||
navigator.clipboard.writeText(getChallengeUrl(target));
|
||||
setHint("Challenge link copied to clipboard!");
|
||||
const url = getChallengeUrl(target);
|
||||
if (!navigator.clipboard) {
|
||||
setHint(url);
|
||||
} else {
|
||||
navigator.clipboard
|
||||
.writeText(url)
|
||||
.then(() => {
|
||||
setHint("Challenge link copied to clipboard!");
|
||||
})
|
||||
.catch(() => {
|
||||
setHint(url);
|
||||
});
|
||||
}
|
||||
}}
|
||||
>
|
||||
Challenge a friend to this word
|
||||
|
|
Loading…
Reference in a new issue