From f9b88d03e322734b3e81e2df6e1dd2d13c919d6b Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Wed, 5 Feb 2020 19:50:40 +0200 Subject: Implement password strength requirements --- frontend/src/UserList.js | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) (limited to 'frontend/src/UserList.js') diff --git a/frontend/src/UserList.js b/frontend/src/UserList.js index dd17ace..59c6425 100644 --- a/frontend/src/UserList.js +++ b/frontend/src/UserList.js @@ -1,6 +1,29 @@ import React, { useEffect, useState } from 'react'; import axios from './axios'; +const Table = ({ users }) => { + const userRows = !!users + ? users.map(user => ( + + {user.id} + {user.username} + + )) + : null; + + return ( + + + + + + + + {userRows} +
IDUsername
+ ); +}; + const UserList = () => { const [ data, setData ] = useState({}); useEffect(() => { @@ -22,16 +45,6 @@ const UserList = () => { })(); }, []); - const users = data.users; - const userRows = !!users - ? users.map(user => ( - - {user.id} - {user.username} - - )) - : null; - return (

User list

@@ -39,15 +52,7 @@ const UserList = () => {
{data.error}
- - - - - - - - {userRows} -
IDUsername
+ {!data.error && } ); -- cgit v1.3