feat: add suspend state and make all buttons related to state working

This commit is contained in:
2024-09-11 17:32:57 +02:00
parent 4f8e6aa928
commit f718d0b18d
7 changed files with 36 additions and 17 deletions

View File

@@ -1,9 +1,12 @@
import { useApp } from "~/hooks/useApp";
import { WaybarWidget } from "../WaybarWidget";
export const WaybarLockWidget = () => {
const { setState } = useApp();
return (
<WaybarWidget className="pl-3 pr-[0.625rem]" interactable>
<button onClick={() => setState("login")}></button>
</WaybarWidget>
);
};

View File

@@ -1,9 +1,12 @@
import { useApp } from "~/hooks/useApp";
import { WaybarWidget } from "../WaybarWidget";
export const WaybarPowerWidget = () => {
const { setState } = useApp();
return (
<WaybarWidget className="pl-[0.625rem] pr-3" interactable>
<button onClick={() => setState("off")}></button>
</WaybarWidget>
);
};