Skip to content

Commit 1d3232b

Browse files
committed
chore: a UserList does not have any props
1 parent bfef790 commit 1d3232b

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

src/ui/views/UserList/Components/UserList.tsx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,9 @@ import Search from '../../../components/Search/Search';
1919
import Danger from '../../../components/Typography/Danger';
2020
import { UserData } from '../../../../types/models';
2121

22-
interface UserListProps {
23-
[key: string]: any;
24-
}
25-
2622
const useStyles = makeStyles(styles as any);
2723

28-
const UserList: React.FC<UserListProps> = (props) => {
24+
const UserList: React.FC = () => {
2925
const classes = useStyles();
3026
const [data, setData] = useState<UserData[]>([]);
3127
const [, setAuth] = useState<boolean>(true);
@@ -40,14 +36,8 @@ const UserList: React.FC<UserListProps> = (props) => {
4036
navigate(`/dashboard/admin/user/${username}`, { replace: true });
4137

4238
useEffect(() => {
43-
const query: Record<string, any> = {};
44-
45-
for (const k in props) {
46-
if (!k) continue;
47-
query[k] = props[k];
48-
}
49-
getUsers(setIsLoading, setData, setAuth, setErrorMessage, query);
50-
}, [props]);
39+
getUsers(setIsLoading, setData, setAuth, setErrorMessage, {});
40+
});
5141

5242
if (isLoading) return <div>Loading...</div>;
5343
if (errorMessage) return <Danger>{errorMessage}</Danger>;

0 commit comments

Comments
 (0)