fix validation sync
This commit is contained in:
@@ -29,7 +29,15 @@ function AdminDashboard({ token }) {
|
||||
setDetections(prev => [data, ...prev].slice(0, 10));
|
||||
});
|
||||
|
||||
return () => socket.off('new_detection');
|
||||
// Real-time updates for approvals
|
||||
socket.on('new_plate_registered', () => fetchData());
|
||||
socket.on('new_person_registered', () => fetchData());
|
||||
|
||||
return () => {
|
||||
socket.off('new_detection');
|
||||
socket.off('new_plate_registered');
|
||||
socket.off('new_person_registered');
|
||||
};
|
||||
}, [token]);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user