This commit is contained in:
Alex Holliday committed 2025-03-26 15:31:38 -07:00
1 parent 8a9cce041d
commit e19be6b1b8
1 file changed
+5 -1
+5 -1
View File
@@ -1,8 +1,12 @@
import { useState } from "react"; import { useState } from "react";
import { networkService } from "../main"; import { networkService } from "../main";
import { useTranslation } from "react-i18next";
const CLIENT_HOST = import.meta.env.VITE_CLIENT_HOST; const CLIENT_HOST = import.meta.env.VITE_CLIENT_HOST;
const useGetInviteToken = () => { const useGetInviteToken = () => {
const { t } = useTranslation();
const [isLoading, setIsLoading] = useState(false); const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState(undefined); const [error, setError] = useState(undefined);
const [token, setToken] = useState(undefined); const [token, setToken] = useState(undefined);
@@ -19,7 +23,7 @@ const useGetInviteToken = () => {
}); });
const token = response?.data?.data?.token; const token = response?.data?.data?.token;
if (typeof token === "undefined") { if (typeof token === "undefined") {
throw new Error("No token"); throw new Error(t("inviteNoTokenFound"));
} }
let inviteLink = token; let inviteLink = token;