Copy a garden (deep duplicate) from the gardens list (#46)
Build image / build-and-push (push) Successful in 16s
Build image / build-and-push (push) Successful in 16s
Co-authored-by: Steve Dudenhoeffer <[email protected]>
This commit was merged in pull request #46.
This commit is contained in:
@@ -5,14 +5,16 @@ import { cardActionClass, cardDangerClass } from '@/components/ui/cardActions'
|
||||
|
||||
/**
|
||||
* One garden as a card: the body links into the editor. The footer differs by
|
||||
* role — the owner gets Share / Edit / Delete; a recipient sees a "shared · role"
|
||||
* badge and a Leave action (garden metadata edit + sharing are owner-only).
|
||||
* role — the owner gets Share / Copy / Edit / Delete; a recipient sees a
|
||||
* "shared · role" badge and a Leave action (garden metadata edit, sharing and
|
||||
* copying are owner-only).
|
||||
* Ownership is the authoritative ownerId==me check, not the my_role hint.
|
||||
*/
|
||||
export function GardenCard({
|
||||
garden,
|
||||
currentUserId,
|
||||
onShare,
|
||||
onCopy,
|
||||
onEdit,
|
||||
onDelete,
|
||||
onLeave,
|
||||
@@ -20,6 +22,7 @@ export function GardenCard({
|
||||
garden: Garden
|
||||
currentUserId?: number
|
||||
onShare: () => void
|
||||
onCopy: () => void
|
||||
onEdit: () => void
|
||||
onDelete: () => void
|
||||
onLeave: () => void
|
||||
@@ -51,6 +54,9 @@ export function GardenCard({
|
||||
<button type="button" onClick={onShare} className={cardActionClass}>
|
||||
Share
|
||||
</button>
|
||||
<button type="button" onClick={onCopy} className={cardActionClass}>
|
||||
Copy
|
||||
</button>
|
||||
<button type="button" onClick={onEdit} className={cardActionClass}>
|
||||
Edit
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user