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