fix(frontend): prevent RangeError in TimeAdjuster and add validation to SleepButton
Build Frontend / build (push) Failing after 3m15s

This commit is contained in:
2026-06-02 21:20:38 +02:00
parent 13bc53ea59
commit c371a3d8e8
5 changed files with 53 additions and 0 deletions
@@ -10,6 +10,10 @@ const SleepButton: React.FC<SleepButtonProps> = ({ time }) => {
const isSleeping = !!activeSession;
const handleClick = async () => {
if (!time) {
alert('Please select a valid time.');
return;
}
try {
if (isSleeping && activeSession?.id) {
await endSession({ sessionId: activeSession.id, endTime: time });