Skip to content

Commit

Permalink
Merge pull request #363 from sinamics/invitation_overflow
Browse files Browse the repository at this point in the history
Resolve overflow Issue with user Invitation Links
  • Loading branch information
sinamics authored Mar 27, 2024
2 parents 5bae1c9 + 3c31c08 commit 99f5cbc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/adminPage/users/userInvitation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,23 +117,23 @@ const InvitationLink = () => {
<p className="pt-5 text-sm text-gray-400">
{t("admin.users.authentication.generateInvitation.activeInvitationsLabel")}
</p>
<div className="flex gap-3">
<div className="flex flex-wrap gap-3 ">
{invitationLink?.map((invite) => {
const expired = new Date(invite.expires) < new Date() || invite?.used;
return (
<div
key={invite.id}
onClick={() => showInviationDetails(invite)}
className="cursor-pointer"
className="cursor-pointer "
>
<p
className={cn("text-md badge", {
"bg-primary": !expired,
"bg-error": expired,
className={cn("text-md badge text-gray-300", {
"bg-primary/30": !expired,
"bg-error/30": expired,
})}
>
{invite.secret}
<span className="pl-1">
<span className="pl-1 ">
{`${invite.timesUsed}/${invite.timesCanUse || 1}`} --{" "}
</span>
{`${expired ? "Expired" : "Expires in"}`}
Expand Down

0 comments on commit 99f5cbc

Please sign in to comment.