Germinal commited on
Commit
9659d4a
·
verified ·
1 Parent(s): e9fbb6e

Upload components/Results.jsx with huggingface_hub

Browse files
Files changed (1) hide show
  1. components/Results.jsx +52 -27
components/Results.jsx CHANGED
@@ -1,11 +1,11 @@
1
- import { FiUser, FiBriefcase, FiMapPin, FiAlertCircle } from 'react-icons/fi';
2
 
3
  export default function Results({ data, loading, error }) {
4
  if (loading) {
5
  return (
6
  <div className="text-center py-8">
7
  <div className="animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4"></div>
8
- <p className="text-gray-600">Carregando dados...</p>
9
  </div>
10
  );
11
  }
@@ -35,37 +35,62 @@ export default function Results({ data, loading, error }) {
35
  }
36
 
37
  return (
38
- <div className="space-y-4">
39
  {data.map((agent, index) => (
40
- <div key={index} className="bg-white rounded-lg shadow-md p-6 hover:shadow-lg transition-shadow">
41
- <div className="flex flex-col md:flex-row md:items-center md:justify-between">
42
- <div className="flex items-center space-x-4 mb-4 md:mb-0">
43
- <div className="bg-primary text-white rounded-full h-12 w-12 flex items-center justify-center font-bold text-xl">
44
- {agent.name.charAt(0)}
 
 
 
 
 
 
 
 
 
 
45
  </div>
46
- <div>
47
- <h3 className="text-lg font-semibold text-gray-900 flex items-center">
48
- <FiUser className="mr-2" /> {agent.name}
49
- </h3>
50
- <p className="text-gray-600 flex items-center">
51
- <FiBriefcase className="mr-2" /> {agent.position}
52
  </p>
 
 
 
53
  </div>
54
  </div>
55
- <div className="text-right">
56
- <p className="text-gray-600 flex items-center justify-end md:justify-start">
57
- <FiMapPin className="mr-2" /> {agent.location}
58
- </p>
59
- <span className={`inline-block px-2 py-1 rounded-full text-xs font-medium ${agent.status === 'ativo' ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'}`}>
60
- {agent.status}
61
- </span>
62
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  </div>
64
- {agent.details && (
65
- <div className="mt-4 pt-4 border-t border-gray-200">
66
- <p className="text-gray-700">{agent.details}</p>
67
- </div>
68
- )}
69
  </div>
70
  ))}
71
  </div>
 
1
+ import { FiUser, FiBriefcase, FiMapPin, FiAlertCircle, FiBarChart2, FiFileText } from 'react-icons/fi';
2
 
3
  export default function Results({ data, loading, error }) {
4
  if (loading) {
5
  return (
6
  <div className="text-center py-8">
7
  <div className="animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4"></div>
8
+ <p className="text-gray-600">Carregando dados e gerando análise...</p>
9
  </div>
10
  );
11
  }
 
35
  }
36
 
37
  return (
38
+ <div className="space-y-6">
39
  {data.map((agent, index) => (
40
+ <div key={index} className="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-lg transition-shadow">
41
+ <div className="p-6">
42
+ <div className="flex flex-col md:flex-row md:items-center md:justify-between">
43
+ <div className="flex items-center space-x-4 mb-4 md:mb-0">
44
+ <div className="bg-primary text-white rounded-full h-12 w-12 flex items-center justify-center font-bold text-xl">
45
+ {agent.name.charAt(0)}
46
+ </div>
47
+ <div>
48
+ <h3 className="text-lg font-semibold text-gray-900 flex items-center">
49
+ <FiUser className="mr-2" /> {agent.name}
50
+ </h3>
51
+ <p className="text-gray-600 flex items-center">
52
+ <FiBriefcase className="mr-2" /> {agent.position}
53
+ </p>
54
+ </div>
55
  </div>
56
+ <div className="text-right">
57
+ <p className="text-gray-600 flex items-center justify-end md:justify-start">
58
+ <FiMapPin className="mr-2" /> {agent.location}
 
 
 
59
  </p>
60
+ <span className={`inline-block px-2 py-1 rounded-full text-xs font-medium ${agent.status === 'ativo' ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'}`}>
61
+ {agent.status}
62
+ </span>
63
  </div>
64
  </div>
65
+
66
+ {agent.details && (
67
+ <div className="mt-4 pt-4 border-t border-gray-200">
68
+ <p className="text-gray-700">{agent.details}</p>
69
+ </div>
70
+ )}
71
+
72
+ {agent.analysis && (
73
+ <div className="mt-4 pt-4 border-t border-gray-200">
74
+ <h4 className="font-medium text-gray-900 mb-2 flex items-center">
75
+ <FiBarChart2 className="mr-2" /> Análise Forense
76
+ </h4>
77
+ <p className="text-gray-700">{agent.analysis}</p>
78
+ </div>
79
+ )}
80
+
81
+ {agent.recommendations && (
82
+ <div className="mt-4 pt-4 border-t border-gray-200">
83
+ <h4 className="font-medium text-gray-900 mb-2 flex items-center">
84
+ <FiFileText className="mr-2" /> Recomendações
85
+ </h4>
86
+ <ul className="list-disc list-inside text-gray-700 space-y-1">
87
+ {agent.recommendations.map((rec, i) => (
88
+ <li key={i}>{rec}</li>
89
+ ))}
90
+ </ul>
91
+ </div>
92
+ )}
93
  </div>
 
 
 
 
 
94
  </div>
95
  ))}
96
  </div>