mirror of
https://git.um-react.app/um/um-react.git
synced 2026-10-22 14:33:01 +00:00
refactor: major package updates
This commit is contained in:
@@ -13,13 +13,12 @@ export interface ImportSecretModalProps {
|
||||
|
||||
export function ImportSecretModal({ clientName, children, show, onClose, onImport }: ImportSecretModalProps) {
|
||||
const handleFileReceived = (files: File[]) => {
|
||||
const promise = onImport(files[0]);
|
||||
if (promise instanceof Promise) {
|
||||
promise.catch((err) => {
|
||||
const importResult = onImport(files[0]);
|
||||
if (importResult instanceof Promise) {
|
||||
importResult.catch((err) => {
|
||||
console.error('could not import: ', err);
|
||||
});
|
||||
}
|
||||
return promise;
|
||||
};
|
||||
|
||||
const refModel = useRef<HTMLDialogElement>(null);
|
||||
|
||||
Reference in New Issue
Block a user