summaryrefslogtreecommitdiff
path: root/packages/bank/src/components/fields/FileInput.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/bank/src/components/fields/FileInput.tsx')
-rw-r--r--packages/bank/src/components/fields/FileInput.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/bank/src/components/fields/FileInput.tsx b/packages/bank/src/components/fields/FileInput.tsx
index 65db491..17413b9 100644
--- a/packages/bank/src/components/fields/FileInput.tsx
+++ b/packages/bank/src/components/fields/FileInput.tsx
@@ -42,9 +42,9 @@ export interface FileInputProps {
export function FileInput(props: FileInputProps): VNode {
const inputRef = useRef<HTMLInputElement>(null);
useLayoutEffect(() => {
- if (props.grabFocus) {
+ if (props.grabFocus)
inputRef.current?.focus();
- }
+
}, [props.grabFocus]);
const fileInputRef = useRef<HTMLInputElement>(null);
@@ -74,9 +74,9 @@ export function FileInput(props: FileInputProps): VNode {
// name={String(name)}
onChange={(e) => {
const f: FileList | null = e.currentTarget.files;
- if (!f || f.length != 1) {
+ if (!f || f.length != 1)
return props.onChange(undefined);
- }
+
console.log(f)
if (f[0].size > MAX_IMAGE_UPLOAD_SIZE) {
setSizeError(true);