Skip to content

Commit

Permalink
set expired when used
Browse files Browse the repository at this point in the history
  • Loading branch information
sinamics committed Aug 25, 2023
1 parent 966b33d commit 49fb419
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/admin/users/userInvitation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const InvitationLink = () => {
api.admin.getInvitationLink.useQuery();

const showInviationDetails = (invite) => {
const expired = new Date(invite.expires) < new Date();
const expired = new Date(invite.expires) < new Date() || invite?.used;
callModal({
title: t("admin.users.authentication.generateInvitation.invitationModal.header"),
rootStyle: "text-left",
Expand All @@ -39,7 +39,7 @@ const InvitationLink = () => {
"admin.users.authentication.generateInvitation.invitationModal.expiresLabel",
)}{" "}
</span>
{expired || invite?.used ? (
{expired ? (
<span className="text-error">Expired</span>
) : (
<span>
Expand Down

0 comments on commit 49fb419

Please sign in to comment.