2024-09-01 14:01:45 +02:00
|
|
|
import { translationAtom } from "@/atoms/translations-atom";
|
|
|
|
import { useAtomValue } from "jotai";
|
2023-09-03 11:16:48 +02:00
|
|
|
import React from "react";
|
|
|
|
|
|
|
|
export function ResetSettings() {
|
2024-09-01 14:01:45 +02:00
|
|
|
const t = useAtomValue(translationAtom);
|
2023-09-03 11:16:48 +02:00
|
|
|
return (
|
|
|
|
<div className="flex flex-col items-start gap-2">
|
2024-09-01 14:01:45 +02:00
|
|
|
<p className="text-sm font-medium">
|
|
|
|
{t("APP.INFOS.RESET_SETTINGS.TITLE")}
|
|
|
|
</p>
|
2023-09-03 11:16:48 +02:00
|
|
|
<button
|
2024-04-21 16:04:59 +02:00
|
|
|
className="btn btn-primary"
|
2023-09-03 11:16:48 +02:00
|
|
|
onClick={async () => {
|
|
|
|
localStorage.clear();
|
2024-09-01 14:01:45 +02:00
|
|
|
alert(t("APP.INFOS.RESET_SETTINGS.ON_RESET"));
|
2024-04-21 16:04:59 +02:00
|
|
|
}}
|
|
|
|
>
|
2024-09-01 14:01:45 +02:00
|
|
|
{t("APP.INFOS.RESET_SETTINGS.TITLE")}
|
2023-09-03 11:16:48 +02:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|