refactor: Add user prop to TransportationCard component for conditional rendering of actions

This commit is contained in:
Sean Morley
2024-07-29 19:19:24 -04:00
parent d5c5551ce1
commit 103500b5e1
3 changed files with 24 additions and 13 deletions

View File

@@ -374,6 +374,7 @@
{#each transportations as transportation}
<TransportationCard
{transportation}
user={data?.user}
on:delete={(event) => {
transportations = transportations.filter((t) => t.id != event.detail);
}}
@@ -430,6 +431,7 @@
{#each dayTransportations as transportation}
<TransportationCard
{transportation}
user={data?.user}
on:delete={(event) => {
transportations = transportations.filter((t) => t.id != event.detail);
}}