added read-only mode + visual improvements

This commit is contained in:
daniel31x13
2024-07-16 20:33:33 -04:00
parent 6d30912812
commit 9c5226ee51
25 changed files with 172 additions and 16 deletions
+5 -1
View File
@@ -30,7 +30,11 @@ export default function DeleteLinkModal({ onClose, activeLink }: Props) {
toast.dismiss(load);
response.ok && toast.success(t("deleted"));
if (response.ok) {
toast.success(t("deleted"));
} else {
toast.error(response.data as string);
}
if (router.pathname.startsWith("/links/[id]")) {
router.push("/dashboard");
+5 -1
View File
@@ -20,7 +20,11 @@ export default function DeleteUserModal({ onClose, userId }: Props) {
toast.dismiss(load);
response.ok && toast.success(t("user_deleted"));
if (response.ok) {
toast.success(t("user_deleted"));
} else {
toast.error(response.data as string);
}
onClose();
};
@@ -30,6 +30,8 @@ export default function DeleteTokenModal({ onClose, activeToken }: Props) {
if (response.ok) {
toast.success(t("token_revoked"));
} else {
toast.error(response.data as string);
}
onClose();