fix: back links on error modals

This commit is contained in:
Elias Schneider
2024-02-05 16:13:54 +01:00
parent e572506d4f
commit f52dffdaac
4 changed files with 26 additions and 5 deletions

View File

@@ -37,6 +37,7 @@ const Share = ({ shareId }: { shareId: string }) => {
modals,
t("share.error.visitor-limit-exceeded.title"),
t("share.error.visitor-limit-exceeded.description"),
"go-home",
);
} else {
toast.axiosError(e);
@@ -58,12 +59,14 @@ const Share = ({ shareId }: { shareId: string }) => {
modals,
t("share.error.removed.title"),
e.response.data.message,
"go-home",
);
} else {
showErrorModal(
modals,
t("share.error.not-found.title"),
t("share.error.not-found.description"),
"go-home",
);
}
} else if (error == "share_password_required") {
@@ -71,7 +74,12 @@ const Share = ({ shareId }: { shareId: string }) => {
} else if (error == "share_token_required") {
getShareToken();
} else {
showErrorModal(modals, t("common.error"), t("common.error.unknown"));
showErrorModal(
modals,
t("common.error"),
t("common.error.unknown"),
"go-home",
);
}
});
};

View File

@@ -30,6 +30,7 @@ const Share = ({ reverseShareToken }: { reverseShareToken: string }) => {
modals,
"Invalid Link",
"This link is invalid. Please check your link.",
"go-home",
);
setIsLoading(false);
});