Fix validation and spacing in new flight form

This commit is contained in:
april
2024-01-15 12:54:42 -06:00
parent 29c6c49b3e
commit 325730a9da
2 changed files with 17 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ export default function ImageUpload({
field,
label = "",
placeholder = "",
mt = "",
}: {
form: UseFormReturnType<
FlightFormSchema,
@@ -17,6 +18,7 @@ export default function ImageUpload({
field: string;
label?: string;
placeholder?: string;
mt?: string;
}) {
const ValueComponent: FileInputProps["valueComponent"] = ({ value }) => {
if (value === null) {
@@ -41,6 +43,7 @@ export default function ImageUpload({
label={label}
placeholder={placeholder}
multiple
mt={mt}
accept="image/*"
valueComponent={ValueComponent}
rightSectionPointerEvents="none"