Skip to content

Commit

Permalink
key
Browse files Browse the repository at this point in the history
  • Loading branch information
sinamics committed Aug 25, 2023
1 parent 559e604 commit 116c3b0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/admin/users/userInvitation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,12 @@ const InvitationLink = () => {
{t("admin.users.authentication.generateInvitation.activeInvitationsLabel")}
</p>
<div className="flex gap-3">
{invitationLink?.map((link) => {
const expired = new Date(link.expires) < new Date();
{invitationLink?.map((invite) => {
const expired = new Date(invite.expires) < new Date();
return (
<div
onClick={() => showInviationDetails(link)}
key={invite.id}
onClick={() => showInviationDetails(invite)}
className="cursor-pointer"
>
<p
Expand All @@ -130,14 +131,14 @@ const InvitationLink = () => {
"bg-error": expired,
})}
>
{link.secret}
{invite.secret}
<span className="pl-1">
{`${link.timesUsed}/${link.timesCanUse || 1}`} --{" "}
{`${invite.timesUsed}/${invite.timesCanUse || 1}`} --{" "}
</span>
{`${expired ? "Expired" : "Expires in"}`}
{!expired && (
<span className="pl-1">
<TimeAgo date={link.expires} />
<TimeAgo date={invite.expires} />
</span>
)}
</p>
Expand Down

0 comments on commit 116c3b0

Please sign in to comment.