mirror of
https://github.com/QuivrHQ/quivr.git
synced 2025-01-05 23:03:53 +03:00
🚑 fix vercel yarn run build fail (#919)
This commit is contained in:
parent
ef429b8ef4
commit
f3d9c89163
@ -16,7 +16,7 @@ import { useEventTracking } from "@/services/analytics/useEventTracking";
|
||||
export const useInvitation = () => {
|
||||
const { t } = useTranslation(["brain", "invitation"]);
|
||||
const params = useParams();
|
||||
const brainId = params.brainId as UUID | undefined;
|
||||
const brainId = params?.brainId as UUID | undefined;
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [brainName, setBrainName] = useState<string>("");
|
||||
const [role, setRole] = useState<BrainRoleType | undefined>();
|
||||
@ -51,7 +51,7 @@ export const useInvitation = () => {
|
||||
} else {
|
||||
publish({
|
||||
variant: "danger",
|
||||
text: t("errorCheckingInvitation",{ns:"invitation"})
|
||||
text: t("errorCheckingInvitation", { ns: "invitation" }),
|
||||
});
|
||||
}
|
||||
router.push("/");
|
||||
@ -88,7 +88,7 @@ export const useInvitation = () => {
|
||||
console.error("Error calling the API:", error);
|
||||
publish({
|
||||
variant: "danger",
|
||||
text: t("errorAccepting",{ns:"invitation"})
|
||||
text: t("errorAccepting", { ns: "invitation" }),
|
||||
});
|
||||
}
|
||||
} finally {
|
||||
@ -103,7 +103,7 @@ export const useInvitation = () => {
|
||||
await declineInvitation(brainId);
|
||||
publish({
|
||||
variant: "success",
|
||||
text: t("declined",{ns:"invitation"})
|
||||
text: t("declined", { ns: "invitation" }),
|
||||
});
|
||||
void track("INVITATION_DECLINED");
|
||||
} catch (error) {
|
||||
@ -119,7 +119,7 @@ export const useInvitation = () => {
|
||||
} else {
|
||||
publish({
|
||||
variant: "danger",
|
||||
text: t("errorDeclining",{ns:"invitation"})
|
||||
text: t("errorDeclining", { ns: "invitation" }),
|
||||
});
|
||||
}
|
||||
} finally {
|
||||
|
Loading…
Reference in New Issue
Block a user