Skip to content

Commit

Permalink
Cannot update and delete the published ads
Browse files Browse the repository at this point in the history
  • Loading branch information
frankduandou committed Jun 18, 2024
1 parent dc05ec4 commit f832a6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/ui/ads-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default function AdsTable({
</td>
<td className="whitespace-nowrap py-3 pl-2 pr-2 w-0.5">
<div className="flex gap-3">
{ad.id && <UpdateAd id={ad.id} />}
{ad.status !== "published" && ad.id && <UpdateAd id={ad.id} />}
</div>
</td>
<td className="whitespace-nowrap py-3 pl-2 pr-2 w-0.5">
Expand All @@ -145,7 +145,7 @@ export default function AdsTable({
</td>
<td className="whitespace-nowrap py-3 pl-2 pr-2 w-0.5">
<div className="flex gap-3">
{ad.id &&<DeleteAd id={ad.id} />}
{ad.status !== "published" && ad.id &&<DeleteAd id={ad.id} />}
</div>
</td>
</tr>
Expand Down

0 comments on commit f832a6f

Please sign in to comment.