Total Complexity | 1 |
Complexity/F | 0 |
Lines of Code | 34 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | const Profile = ({ userData }) => { |
||
2 | const userInfo = () => { |
||
3 | return userData.arrayOverview |
||
4 | .map((item, index) => { |
||
5 | return ( |
||
6 | <tr key={index} className="border-b text-base border-gray-400"> |
||
7 | <td className="py-3 px-6">{index}</td> |
||
8 | <td className="py-3 px-6">{item.name}</td> |
||
9 | </tr> |
||
10 | ); |
||
11 | }); |
||
12 | }; |
||
13 | |||
14 | if (!userData.arrayOverview) { |
||
15 | return <div>Loading</div>; |
||
16 | } |
||
17 | |||
18 | return ( |
||
19 | <> |
||
20 | <table className="w-full text-lg content-between text-center"> |
||
21 | <thead className=" bg-sidebarBlue text-gray-200"> |
||
22 | <tr> |
||
23 | <th className="font-normal px-6">ID</th> |
||
24 | <th className="font-normal px-6">Name:</th> |
||
25 | </tr> |
||
26 | </thead> |
||
27 | <tbody>{userInfo()}</tbody> |
||
28 | </table> |
||
29 | </> |
||
30 | ); |
||
31 | }; |
||
32 | |||
33 | export default Profile; |
||
34 |