This commit is contained in:
Alex Holliday committed 2026-01-06 23:04:30 +00:00
1 parent 61bf2a0dfb
commit 3611aee468
8 files changed
+35 -15

No files matched your search

+4 -3
View File
@@ -17,6 +17,7 @@ import { registerSchema } from "@/validation";
import { useGet } from "@/hooks/UseApi";
import { useParams } from "react-router";
import type { IUser } from "@/types/user";
import type { Invite } from "@/types/invite";
type FormData = z.infer<typeof registerSchema>;
const RegisterInvite = () => {
@@ -25,9 +26,9 @@ const RegisterInvite = () => {
const { t } = useTranslation();
const navigate = useNavigate();
const { post, loading, error } = usePost<Partial<FormData>, IUser>();
const { response, error: errorInvite } = useGet<ApiResponse<any>>(
`/invite/${token}`
);
const { response, error: errorInvite } = useGet<
ApiResponse<{ user: IUser; invite: Invite }>
>(`/invite/${token}`);
const { user, invite } = response?.data || {};
const hasUser = Boolean(user);
const dispatch = useAppDispatch();
+14
View File
@@ -0,0 +1,14 @@
export interface Invite {
id: string;
orgId: string;
orgRoleId?: string;
teamId: string;
teamRoleId: string;
email: string;
tokenHash: string;
createdBy: string;
updatedBy: string;
expiry: string;
createdAt: string;
updatedAt: string;
}