refactoring

This commit is contained in:
2025-11-10 15:26:18 +01:00
parent 40819ebaa9
commit de8fa09791

View File

@@ -325,31 +325,33 @@ const DashboardView = ({
<span className="block text-xs text-gray-500">Klicke zum Auswählen</span> <span className="block text-xs text-gray-500">Klicke zum Auswählen</span>
</button> </button>
</td> </td>
<td className="px-4 py-2 text-right space-x-2"> <td className="px-4 py-2 text-right">
<button <div className="inline-flex items-center justify-end gap-3 whitespace-nowrap">
type="button"
onClick={() => onHideEntry(item.id)}
className="text-gray-600 hover:text-gray-900"
title="Ausblenden"
>
<svg xmlns="http://www.w3.org/2000/svg" className="inline h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 19c7 0 9-7 9-7s-2-7-9-7-9 7-9 7 2 7 9 7z" />
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 15a3 3 0 100-6 3 3 0 000 6z" />
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 3l18 18" />
</svg>
</button>
{canDelete && (
<button <button
type="button" type="button"
onClick={() => onDeleteEntry(item.id)} onClick={() => onHideEntry(item.id)}
className="ml-2 text-red-600 hover:text-red-800" className="text-gray-600 hover:text-gray-900"
title="Löschen" title="Ausblenden"
> >
<svg xmlns="http://www.w3.org/2000/svg" className="inline h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <svg xmlns="http://www.w3.org/2000/svg" className="inline h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" /> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 19c7 0 9-7 9-7s-2-7-9-7-9 7-9 7 2 7 9 7z" />
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 15a3 3 0 100-6 3 3 0 000 6z" />
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 3l18 18" />
</svg> </svg>
</button> </button>
)} {canDelete && (
<button
type="button"
onClick={() => onDeleteEntry(item.id)}
className="text-red-600 hover:text-red-800"
title="Löschen"
>
<svg xmlns="http://www.w3.org/2000/svg" className="inline h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
</svg>
</button>
)}
</div>
</td> </td>
</tr> </tr>
); );