import { useEffect, useState } from "react"; import { useApp } from "~/hooks/useApp"; export const Off = () => { const { state, setState } = useApp(); const [booting, setBooting] = useState(state === "reboot"); useEffect(() => { if (booting) { const timout = setTimeout(() => { if (state === "suspend") { setState("login"); } else { setState("boot"); } }, 1000); return () => clearTimeout(timout); } }, [state, setState, booting]); return (
This website is primarly made for desktop