빌드에러수정

This commit is contained in:
YangJinSoo94
2025-07-21 15:29:08 +09:00
parent 7a24c10f3d
commit baabc72f58
4 changed files with 13 additions and 16 deletions
@@ -1,11 +1,10 @@
import * as React from "react";
import type { ReactNode } from "react";
import type { ControllerRenderProps, FieldError, FieldValues } from "react-hook-form";
import { FormUi } from "@common/business_components/ui";
import type { ReactNode } from "react";
import type { ControllerRenderProps, FieldError, FieldValues, Path } from "react-hook-form";
interface AccessibleFormFieldProps<T extends FieldValues> {
field: ControllerRenderProps<T, any>;
field: ControllerRenderProps<T, Path<T>>;
label: string;
required?: boolean;
error?: FieldError;
@@ -19,15 +18,10 @@ export function AccessibleFormField<T extends FieldValues>({
error,
inputComponent,
}: AccessibleFormFieldProps<T>) {
const labelText = required ? `${label} *` : label;
return (
<FormUi
label={
<span>
<span className="text-black">{label}</span>
{required && <span className="text-red-500">&nbsp;*</span>}
</span>
}
>
<FormUi label={labelText}>
<div>
{inputComponent}
{error?.message && Array.from(new Set(error.message.split('\n'))).map((msg, idx) => (