feat: update cat
All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 9m50s
All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 9m50s
This commit is contained in:
@@ -7,13 +7,13 @@ export function BirthDayField({inti_date, inti_category, required = true}) {
|
||||
const [category, setCategory] = useState(inti_category)
|
||||
const [canUpdate, setCanUpdate] = useState(false)
|
||||
useEffect(() => {
|
||||
const b = category !== getCategoryFormBirthDate(new Date(date), new Date('2023-09-01'))
|
||||
const b = category !== getCategoryFormBirthDate(new Date(date))
|
||||
if (b !== canUpdate)
|
||||
setCanUpdate(b)
|
||||
}, [date, category])
|
||||
|
||||
const updateCat = _ => {
|
||||
setCategory(getCategoryFormBirthDate(new Date(date), new Date('2023-09-01')))
|
||||
setCategory(getCategoryFormBirthDate(new Date(date)))
|
||||
}
|
||||
|
||||
return <>
|
||||
@@ -127,4 +127,4 @@ export const Checkbox = ({label, value, onChange}) => {
|
||||
<input className="form-check-input" type="checkbox" id="checkbox1" checked={value} onChange={handleChange}/>
|
||||
<label className="form-check-label" htmlFor="checkbox1">{label}</label>
|
||||
</div>
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user