mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-10-04 20:00:12 +00:00
404 hosts add update complete, fix certbot renewals
and remove the need for email and agreement on cert requests
This commit is contained in:
@@ -17,9 +17,13 @@ export function UserModal({ userId, onClose }: Props) {
|
||||
const { data: currentUser, isLoading: currentIsLoading } = useUser("me");
|
||||
const { mutate: setUser } = useSetUser();
|
||||
const [errorMsg, setErrorMsg] = useState<string | null>(null);
|
||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||
|
||||
const onSubmit = async (values: any, { setSubmitting }: any) => {
|
||||
if (isSubmitting) return;
|
||||
setIsSubmitting(true);
|
||||
setErrorMsg(null);
|
||||
|
||||
const { ...payload } = {
|
||||
id: userId === "new" ? undefined : userId,
|
||||
roles: [],
|
||||
@@ -43,7 +47,10 @@ export function UserModal({ userId, onClose }: Props) {
|
||||
showSuccess(intl.formatMessage({ id: "notification.user-saved" }));
|
||||
onClose();
|
||||
},
|
||||
onSettled: () => setSubmitting(false),
|
||||
onSettled: () => {
|
||||
setIsSubmitting(false);
|
||||
setSubmitting(false);
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -68,7 +75,7 @@ export function UserModal({ userId, onClose }: Props) {
|
||||
}
|
||||
onSubmit={onSubmit}
|
||||
>
|
||||
{({ isSubmitting }) => (
|
||||
{() => (
|
||||
<Form>
|
||||
<Modal.Header closeButton>
|
||||
<Modal.Title>
|
||||
|
Reference in New Issue
Block a user