committing event form unfinished

This commit is contained in:
ashprit
2024-10-26 15:47:02 +01:00
parent 8e4e747382
commit 9e836a7de1
8 changed files with 6800 additions and 10 deletions

View File

@@ -1,3 +1,4 @@
'use client';
import React, { useState } from 'react';
import { Button } from '../ui/button'; // Adjust import path to where your shadcn Button component is located
@@ -20,7 +21,9 @@ const NumberPicker: React.FC<NumberPickerProps> = ({
if (count < max) {
const newCount = count + 1;
setCount(newCount);
onChange && onChange(newCount);
if (onChange) {
onChange(newCount);
}
}
};
@@ -28,7 +31,9 @@ const NumberPicker: React.FC<NumberPickerProps> = ({
if (count > min) {
const newCount = count - 1;
setCount(newCount);
onChange && onChange(newCount);
if (onChange) {
onChange(newCount);
}
}
};