feat: add edit button to media cards
This commit is contained in:
parent
2b545b28d5
commit
da4fbaa9e8
@ -1,7 +1,7 @@
|
||||
import { APPWRITE_ALMEIRA_CONFIG } from '@/lib/appwrite';
|
||||
import { createSessionClient } from '@/lib/appwrite.server';
|
||||
import Link from 'next/link';
|
||||
import { Image as ImageIcon, Video, Plus, Trash2 } from 'lucide-react';
|
||||
import { Image as ImageIcon, Video, Plus, Trash2, Pencil } from 'lucide-react';
|
||||
import { DeleteButton } from '@/components/DeleteButton';
|
||||
|
||||
import { Query } from 'node-appwrite';
|
||||
@ -129,7 +129,10 @@ export default async function MediaLibraryPage({
|
||||
// eslint-disable-next-line @next/next/no-img-element
|
||||
<img src={fileUrl} alt={item.alt_text || item.titulo} title={item.titulo} className="w-full h-full object-cover group-hover:scale-110 transition-transform duration-700" />
|
||||
)}
|
||||
<div className="absolute top-2 right-2 flex bg-black/50 backdrop-blur-md rounded-lg p-1 opacity-0 group-hover:opacity-100 transition-opacity">
|
||||
<div className="absolute top-2 right-2 flex items-center gap-1 bg-black/50 backdrop-blur-md rounded-lg p-1 opacity-0 group-hover:opacity-100 transition-opacity">
|
||||
<Link href={`/dashboard/media/${item.$id}`} className="p-2 text-slate-300 hover:text-cyan-400 hover:bg-white/10 rounded-md transition-colors" title="Editar">
|
||||
<Pencil size={16} />
|
||||
</Link>
|
||||
<DeleteButton collectionId={"media"} documentId={item.$id} entityAlias={"media"} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user