chore: set selected phase to null if category change

This commit is contained in:
ValdiANS
2026-01-21 10:19:46 +07:00
parent 93513c4a3a
commit c4f8051fba
@@ -147,10 +147,6 @@ export function MasterAktivitasContent() {
time_type: 'umum',
});
useEffect(() => {
setInitialLoading(false);
}, []);
// Phase handlers
const handleAddPhase = () => {
if (!selectedCategory) {
@@ -423,6 +419,14 @@ export function MasterAktivitasContent() {
}
};
useEffect(() => {
setInitialLoading(false);
}, []);
useEffect(() => {
setSelectedPhase(null);
}, [selectedCategory]);
if (initialLoading) {
return (
<div className='min-h-screen'>