1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-12-21 11:55:53 +01:00
upscayl/renderer/components/settings-tab/TurnOffNotificationsToggle.tsx

32 lines
916 B
TypeScript
Raw Normal View History

import { translationAtom } from "@/atoms/translations-atom";
2024-01-16 08:33:43 +01:00
import { turnOffNotificationsAtom } from "@/atoms/userSettingsAtom";
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;