diff --git a/client/src/pages/DashboardPage.tsx b/client/src/pages/DashboardPage.tsx index a27c417..6272fe8 100644 --- a/client/src/pages/DashboardPage.tsx +++ b/client/src/pages/DashboardPage.tsx @@ -147,10 +147,9 @@ interface TripCardProps { t: (key: string, params?: Record) => string locale: string dark?: boolean - isAdmin?: boolean } -function SpotlightCard({ trip, onEdit, onDelete, onArchive, onClick, t, locale, dark, isAdmin }: TripCardProps): React.ReactElement { +function SpotlightCard({ trip, onEdit, onDelete, onArchive, onClick, t, locale, dark }: TripCardProps): React.ReactElement { const status = getTripStatus(trip) const coverBg = trip.cover_image @@ -233,7 +232,7 @@ function SpotlightCard({ trip, onEdit, onDelete, onArchive, onClick, t, locale, } // ── Regular Trip Card ──────────────────────────────────────────────────────── -function TripCard({ trip, onEdit, onDelete, onArchive, onClick, t, locale, isAdmin }: Omit): React.ReactElement { +function TripCard({ trip, onEdit, onDelete, onArchive, onClick, t, locale }: Omit): React.ReactElement { const status = getTripStatus(trip) const [hovered, setHovered] = useState(false) @@ -324,7 +323,7 @@ function TripCard({ trip, onEdit, onDelete, onArchive, onClick, t, locale, isAdm } // ── List View Item ────────────────────────────────────────────────────────── -function TripListItem({ trip, onEdit, onDelete, onArchive, onClick, t, locale, isAdmin }: Omit): React.ReactElement { +function TripListItem({ trip, onEdit, onDelete, onArchive, onClick, t, locale }: Omit): React.ReactElement { const status = getTripStatus(trip) const [hovered, setHovered] = useState(false) @@ -430,10 +429,9 @@ interface ArchivedRowProps { onClick: (trip: DashboardTrip) => void t: (key: string, params?: Record) => string locale: string - isAdmin?: boolean } -function ArchivedRow({ trip, onEdit, onUnarchive, onDelete, onClick, t, locale, isAdmin }: ArchivedRowProps): React.ReactElement { +function ArchivedRow({ trip, onEdit, onUnarchive, onDelete, onClick, t, locale }: ArchivedRowProps): React.ReactElement { return (
onClick(trip)} style={{ display: 'flex', alignItems: 'center', gap: 12, padding: '10px 16px', @@ -459,7 +457,7 @@ function ArchivedRow({ trip, onEdit, onUnarchive, onDelete, onClick, t, locale,
)} - {(!!trip.is_owner || isAdmin) && ( + {(onEdit || onUnarchive || onDelete) && (
e.stopPropagation()}> {onUnarchive &&