From fea7d4d9e44c234fdd9fd3203931779e3ebf80cd Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Sun, 7 Jul 2024 13:45:43 +0100 Subject: [PATCH] fix: allow invites to be infinitely created if you're an admin --- .../pages/dashboard/users/UserInvitesPage.tsx | 53 ++++++++++--------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/client/src/app/pages/dashboard/users/UserInvitesPage.tsx b/client/src/app/pages/dashboard/users/UserInvitesPage.tsx index 5341a22fd..8901a37ff 100644 --- a/client/src/app/pages/dashboard/users/UserInvitesPage.tsx +++ b/client/src/app/pages/dashboard/users/UserInvitesPage.tsx @@ -11,7 +11,7 @@ import useApiQuery from "components/util/query/useApiQuery"; import React from "react"; import { Button, Col, Row } from "react-bootstrap"; import { Link } from "react-router-dom"; -import { integer, InviteCodeDocument, UserDocument } from "tachi-common"; +import { integer, InviteCodeDocument, UserAuthLevels, UserDocument } from "tachi-common"; import Icon from "components/util/Icon"; export default function UserInvitesPage({ reqUser }: { reqUser: UserDocument }) { @@ -51,32 +51,33 @@ export default function UserInvitesPage({ reqUser }: { reqUser: UserDocument }) - {newInvites !== 0 && ( - -
- -
- - - )} + if (r.success) { + DelayedPageReload(); + } + }} + className="btn btn-primary" + > + Create new Invite + + + + + ))}

Your Invites