1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-12-18 18:35:58 +01:00
upscayl/renderer/components/sidebar/settings-tab/turn-off-notifications-toggle.tsx

32 lines
918 B
TypeScript
Raw Normal View History

import { translationAtom } from "@/atoms/translations-atom";
import { turnOffNotificationsAtom } from "@/atoms/user-settings-atom";
import { useAtom, useAtomValue } from "jotai";
2024-01-16 08:33:43 +01:00
const TurnOffNotificationsToggle = () => {
const [turnOffNotifications, setTurnOffNotifications] = useAtom(
turnOffNotificationsAtom,
2024-01-16 08:33:43 +01:00
);
const t = useAtomValue(translationAtom);
2024-01-16 08:33:43 +01:00
return (
<div className="flex flex-col gap-2">
<p className="text-sm font-medium">
{t("SETTINGS.TURN_OFF_NOTIFICATIONS.TITLE")}
</p>
2024-01-16 08:33:43 +01:00
<p className="text-xs text-base-content/80">
{t("SETTINGS.TURN_OFF_NOTIFICATIONS.DESCRIPTION")}
2024-01-16 08:33:43 +01:00
</p>
<input
type="checkbox"
className="toggle"
checked={turnOffNotifications}
onClick={() => {
setTurnOffNotifications(!turnOffNotifications);
}}
/>
</div>
);
};
export default TurnOffNotificationsToggle;