feat: Add confirmation prompt for 'Systemzeit übernehmen' button

- Added window.confirm to the "Systemzeit übernehmen" button to confirm before applying the system time change.
- Ensured user confirmation before updating the system time.
This commit is contained in:
ISA
2024-10-18 10:41:40 +02:00
parent 0a4cb1567a
commit 50cf1d3cea

View File

@@ -266,7 +266,15 @@ function SettingModal({ showModal, onClose }) {
<div className="flex w-full mt-1 justify-end">
<button
className="bg-blue-500 text-white px-4 py-2 rounded"
onClick={() => console.log("Systemzeit übernehmen")}
onClick={() => {
if (
window.confirm(
"Möchten Sie wirklich die Systemzeit übernehmen?"
)
) {
setSystemUhr(new Date().toLocaleString());
}
}}
>
Systemzeit übernehmen
</button>