upd : modal filter

Deskripsi:
- update refresh modal filter saat ada perubahan data grup

No Issues
This commit is contained in:
2025-09-09 14:35:45 +08:00
parent 83291676d3
commit 1853cb573c

View File

@@ -33,6 +33,7 @@ export default function ModalFilter({ open, close, page, category }: Props) {
const { token, decryptToken } = useAuthSession()
const dispatch = useDispatch()
const entities = useSelector((state: any) => state.filterGroup)
const update = useSelector((state: any) => state.groupUpdate)
const [chooseGroup, setChooseGroup] = useState('')
async function handleLoad() {
@@ -42,10 +43,8 @@ export default function ModalFilter({ open, close, page, category }: Props) {
}
useEffect(() => {
if (entities.length == 0) {
handleLoad()
}
}, [dispatch]);
}, [dispatch, update]);