refactor: replace detail button with Link for battery navigation and static label
This commit is contained in:
@@ -622,9 +622,9 @@ export default function BatteriesPage() {
|
||||
</td>
|
||||
<td className="px-4 py-3">
|
||||
<div className="flex items-center gap-1">
|
||||
<button onClick={() => handleViewDetails(battery)} className="p-2 hover:bg-slate-100 rounded-lg" title="View Details">
|
||||
<Link href={`/admin/batteries/${battery.id}`} className="p-2 hover:bg-slate-100 rounded-lg inline-flex items-center" title="View Details">
|
||||
<Eye className="w-4 h-4 text-blue-500" />
|
||||
</button>
|
||||
</Link>
|
||||
<button onClick={() => handleViewHistory(battery)} className="p-2 hover:bg-slate-100 rounded-lg" title="History">
|
||||
<History className="w-4 h-4 text-purple-500" />
|
||||
</button>
|
||||
@@ -697,9 +697,9 @@ export default function BatteriesPage() {
|
||||
)}
|
||||
|
||||
<div className="flex items-center gap-1">
|
||||
<button onClick={() => handleViewDetails(battery)} className="flex-1 py-1.5 text-xs font-medium text-blue-600 hover:bg-blue-50 rounded-lg">
|
||||
<div className="flex-1 py-1.5 text-xs font-medium text-blue-600 hover:bg-blue-50 rounded-lg text-center">
|
||||
Details
|
||||
</button>
|
||||
</div>
|
||||
<button onClick={() => handleViewHistory(battery)} className="flex-1 py-1.5 text-xs font-medium text-purple-600 hover:bg-purple-50 rounded-lg">
|
||||
History
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user