Closed nspool closed 1 year ago
WARNING in [eslint] src/components/admin/UserComponent.js Line 27:6: React Hook useEffect has a missing dependency: 'onAdd'. Either include it or remove the dependency array. If 'onAdd' changes too often, find the parent component that defines it and wrap that definition in useCallback react-hooks/exhaustive-deps Line 31:6: React Hook useEffect has a missing dependency: 'onAdd'. Either include it or remove the dependency array. If 'onAdd' changes too often, find the parent component that defines it and wrap that definition in useCallback react-hooks/exhaustive-deps
src/components/admin/UserList.js Line 62:30: 'i' is defined but never used no-unused-vars
@utas-raymondng fixed linter warnings. Also refactored into a reducer.
@utas-raymondng fixed linter warnings. Also refactored into a reducer.
Looks good now. A minor issue that I accidentally hit the "disable account" of the admin user of current login which ends up not able to do anything until I add the value back in the db. It may be better to show warning if user try to disable the current login user.
For users with the Admin role this will display a list of users with the following functions: