Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update delete-token-modal.tsx

Steven Tey76d06962a27a
diff --git a/apps/web/ui/modals/delete-token-modal.tsx b/apps/web/ui/modals/delete-token-modal.tsx
index 884d207cfe..bba998c87f 100644
--- a/apps/web/ui/modals/delete-token-modal.tsx
+++ b/apps/web/ui/modals/delete-token-modal.tsx
@@ -73,18 +73,20 @@ function DeleteTokenModal({
</div>
<div className="flex items-center gap-2">
- <Tooltip content={token.user.name}>
- <img
- src={
- token.user.isMachine
- ? "https://api.dicebear.com/7.x/bottts/svg?seed=Sara"
- : token.user.image ||
- `${DICEBEAR_AVATAR_URL}${token.user.id}`
- }
- alt={token.user.name!}
- className="size-5 rounded-full"
- />
- </Tooltip>
+ {token.user && (
+ <Tooltip content={token.user.name}>
+ <img
+ src={
+ token.user.isMachine
+ ? "https://api.dicebear.com/7.x/bottts/svg?seed=Sara"
+ : token.user.image ||
+ `${DICEBEAR_AVATAR_URL}${token.user.id}`
+ }
+ alt={token.user.name!}
+ className="size-5 rounded-full"
+ />
+ </Tooltip>
+ )}
<p className="text-xs text-neutral-500">
{new Date(token.createdAt).toLocaleDateString("en-us", {
month: "short",