mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 22:28:25 +00:00
fix: ui state
This commit is contained in:
-4
@@ -45,7 +45,6 @@ export const EnvKeyPlatformModal = ({ onClose }: Props) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
await importEnvKey({
|
await importEnvKey({
|
||||||
file: data.file,
|
file: data.file,
|
||||||
decryptionKey: data.encryptionKey
|
decryptionKey: data.encryptionKey
|
||||||
@@ -62,9 +61,6 @@ export const EnvKeyPlatformModal = ({ onClose }: Props) => {
|
|||||||
if (fileUploadRef.current) {
|
if (fileUploadRef.current) {
|
||||||
fileUploadRef.current.value = "";
|
fileUploadRef.current.value = "";
|
||||||
}
|
}
|
||||||
} catch {
|
|
||||||
reset();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const onImportFileDrop = (file?: File) => {
|
const onImportFileDrop = (file?: File) => {
|
||||||
|
|||||||
+8
-5
@@ -74,13 +74,19 @@ export const VaultPlatformModal = ({ onClose }: Props) => {
|
|||||||
control,
|
control,
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
reset,
|
reset,
|
||||||
formState: { isLoading, isDirty, isSubmitting, isValid }
|
formState: { isLoading, isDirty, isSubmitting, isValid, errors }
|
||||||
} = useForm<TFormData>({
|
} = useForm<TFormData>({
|
||||||
resolver: zodResolver(formSchema)
|
resolver: zodResolver(formSchema)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log({
|
||||||
|
isSubmitting,
|
||||||
|
isLoading,
|
||||||
|
isValid,
|
||||||
|
errors
|
||||||
|
});
|
||||||
|
|
||||||
const onSubmit = async (data: TFormData) => {
|
const onSubmit = async (data: TFormData) => {
|
||||||
try {
|
|
||||||
await importVault({
|
await importVault({
|
||||||
vaultAccessToken: data.vaultAccessToken,
|
vaultAccessToken: data.vaultAccessToken,
|
||||||
vaultNamespace: data.vaultNamespace,
|
vaultNamespace: data.vaultNamespace,
|
||||||
@@ -95,9 +101,6 @@ export const VaultPlatformModal = ({ onClose }: Props) => {
|
|||||||
|
|
||||||
onClose();
|
onClose();
|
||||||
reset();
|
reset();
|
||||||
} catch {
|
|
||||||
reset();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user