made kid wallet refresh when parent transfers cash

This commit is contained in:
victorAnumudu
2024-03-20 13:43:23 +01:00
parent a910ab177f
commit 1e28a0e15b
4 changed files with 33 additions and 7 deletions
@@ -65,6 +65,9 @@ export default function SocketIOContextProvider({children}) {
if(message.action == "REFRESH_TASK" && message.audience == "PARENT"){ // for refreshing parent account when child accepts or rejects a job
dispatch(tableReload({type:'PARENTFAMILYTASKLIST'})) // dispatches to update parent family task list on parent side
}
if(message.action == "REFRESH_WALLET" && message.family_uid == user_uid && message.audience == "MEMBER"){ // for refreshing child wallet account when parent sends money to kid
dispatch(tableReload({type:'WALLETTABLE'})) // dispatches to update wallet balance on family side
}
// console.log('DATA', data)
});
}, [socket]);