Skip to content

Commit

Permalink
type
Browse files Browse the repository at this point in the history
  • Loading branch information
sinamics committed Aug 25, 2023
1 parent 49fb419 commit a902d7d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/admin/users/userInvitation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { CopyToClipboard } from "react-copy-to-clipboard";
import toast from "react-hot-toast";
import cn from "classnames";
import { useTranslations } from "next-intl";
import { UserInvitation } from "@prisma/client";

const InvitationLink = () => {
const t = useTranslations();
Expand All @@ -16,7 +17,7 @@ const InvitationLink = () => {
const { data: invitationLink, refetch: refetchInvitations } =
api.admin.getInvitationLink.useQuery();

const showInviationDetails = (invite) => {
const showInviationDetails = (invite: UserInvitation) => {
const expired = new Date(invite.expires) < new Date() || invite?.used;
callModal({
title: t("admin.users.authentication.generateInvitation.invitationModal.header"),
Expand Down Expand Up @@ -151,7 +152,8 @@ const InvitationLink = () => {
</div>
);
};
const UserInvitation = () => {

const UserInvitationLink = () => {
const t = useTranslations();

const { mutate: generateInvitation } = api.admin.generateInviteLink.useMutation();
Expand Down Expand Up @@ -221,4 +223,4 @@ const UserInvitation = () => {
);
};

export default UserInvitation;
export default UserInvitationLink;

0 comments on commit a902d7d

Please sign in to comment.