added api connectin to create and update user interface
This commit is contained in:
@@ -23,7 +23,7 @@ export const userTableReducer = (state, action) => {
|
||||
let newstate = [];
|
||||
let newindex = 0;
|
||||
state.forEach((u, i) => {
|
||||
if (user.uid && u.uid !== user.uid|| user.line && i !== user.line )
|
||||
if (user.uid && u.uid != user.uid|| user.line && i != user.line )
|
||||
newstate.push({ ...u, line: newindex++ })
|
||||
return newstate;
|
||||
}, []);
|
||||
@@ -32,7 +32,7 @@ export const userTableReducer = (state, action) => {
|
||||
case 'update': {
|
||||
let newstate = [];
|
||||
state.forEach((u, i) => {
|
||||
if (user.uid && u.uid === user.uid || user.line && i === user.line)
|
||||
if (user.uid && u.uid == user.uid || user.line && i == user.line)
|
||||
newstate.push(user);
|
||||
else
|
||||
newstate.push(u);
|
||||
|
||||
Reference in New Issue
Block a user