mirror of
https://github.com/upscayl/upscayl.git
synced 2024-12-21 11:55:53 +01:00
d721e7ae7f
MOD: All necessary strings to match
32 lines
916 B
TypeScript
32 lines
916 B
TypeScript
import { translationAtom } from "@/atoms/translations-atom";
|
|
import { turnOffNotificationsAtom } from "@/atoms/userSettingsAtom";
|
|
import { useAtom, useAtomValue } from "jotai";
|
|
|
|
const TurnOffNotificationsToggle = () => {
|
|
const [turnOffNotifications, setTurnOffNotifications] = useAtom(
|
|
turnOffNotificationsAtom,
|
|
);
|
|
const t = useAtomValue(translationAtom);
|
|
|
|
return (
|
|
<div className="flex flex-col gap-2">
|
|
<p className="text-sm font-medium">
|
|
{t("SETTINGS.TURN_OFF_NOTIFICATIONS.TITLE")}
|
|
</p>
|
|
<p className="text-xs text-base-content/80">
|
|
{t("SETTINGS.TURN_OFF_NOTIFICATIONS.DESCRIPTION")}
|
|
</p>
|
|
<input
|
|
type="checkbox"
|
|
className="toggle"
|
|
checked={turnOffNotifications}
|
|
onClick={() => {
|
|
setTurnOffNotifications(!turnOffNotifications);
|
|
}}
|
|
/>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default TurnOffNotificationsToggle;
|