use pendingMembers context
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
export const userCreatedListener = (echo, userData, setNotifications, setunreadNotification) => {
|
||||
export const userCreatedListener = (echo, userData, setNotifications, setunreadNotification, updatePendingMembers) => {
|
||||
if (userData.isAdmin) {
|
||||
const channelName = "users.registration";
|
||||
echo.private(channelName)
|
||||
@@ -11,6 +11,10 @@ export const userCreatedListener = (echo, userData, setNotifications, setunreadN
|
||||
};
|
||||
setNotifications(prev => [newNotification, ...prev]);
|
||||
setunreadNotification(true);
|
||||
|
||||
if (typeof updatePendingMembers === "function") {
|
||||
updatePendingMembers();
|
||||
}
|
||||
});
|
||||
return channelName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user