fix(frontend): prevent RangeError in TimeAdjuster and add validation to SleepButton
Build Frontend / build (push) Failing after 3m15s
Build Frontend / build (push) Failing after 3m15s
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user