diff --git a/leaky-ships/.prettierrc.json b/leaky-ships/.prettierrc.json index cce9d3c..7e66ab7 100644 --- a/leaky-ships/.prettierrc.json +++ b/leaky-ships/.prettierrc.json @@ -1,3 +1,5 @@ { - "semi": false + "semi": false, + "plugins": ["prettier-plugin-tailwindcss"], + "pluginSearchDirs": false } diff --git a/leaky-ships/pages/dev/lobby.tsx b/leaky-ships/pages/dev/lobby.tsx new file mode 100644 index 0000000..f141898 --- /dev/null +++ b/leaky-ships/pages/dev/lobby.tsx @@ -0,0 +1,101 @@ +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" +import { faCaretDown } from "@fortawesome/sharp-solid-svg-icons" +import classNames from "classnames" +import { useEffect, useState } from "react" + +export default function Home() { + const [enemy, setEnemy] = useState(false) + const [dots, setDots] = useState(0) + + useEffect(() => { + if (enemy) return + const interval = setInterval(() => setDots((e) => (e % 3) + 1), 1000) + return () => clearInterval(interval) + }) + + return ( +
setEnemy((e) => !e)} + > + VS +
+ {enemy ? ( ++ Warte auf Spieler 2 {Array.from(Array(dots), () => ".").join("")} +
+ )} ++ {text} +
+