Fix
All checks were successful
Lint / lint (push) Successful in 12s

This commit is contained in:
Julien Valverdé
2025-10-23 23:50:30 +02:00
parent bbad86bf97
commit b73b053cc8

View File

@@ -1,6 +1,6 @@
import { Callout, Flex, Spinner, Switch, TextField } from "@radix-ui/themes" import { Callout, Flex, Spinner, Switch, TextField } from "@radix-ui/themes"
import { Array, Option, Struct } from "effect" import { Array, Option, Struct } from "effect"
import { Component, Form, Hooks } from "effect-fc" import { Component, Form, Subscribable } from "effect-fc"
interface Props interface Props
@@ -18,8 +18,7 @@ extends Omit<TextField.RootProps, "optional" | "defaultValue">, Form.useOptional
export type TextFieldFormInputProps = Props | OptionalProps export type TextFieldFormInputProps = Props | OptionalProps
export class TextFieldFormInput extends Component.makeUntraced("TextFieldFormInput")( export class TextFieldFormInput extends Component.makeUntraced("TextFieldFormInput")(function*(props: TextFieldFormInputProps) {
function*(props: TextFieldFormInputProps) {
const input: ( const input: (
| { readonly optional: true } & Form.useOptionalInput.Result<string> | { readonly optional: true } & Form.useOptionalInput.Result<string>
| { readonly optional: false } & Form.useInput.Result<string> | { readonly optional: false } & Form.useInput.Result<string>
@@ -29,7 +28,7 @@ export class TextFieldFormInput extends Component.makeUntraced("TextFieldFormInp
// biome-ignore lint/correctness/useHookAtTopLevel: "optional" reactivity not supported // biome-ignore lint/correctness/useHookAtTopLevel: "optional" reactivity not supported
: { optional: false, ...yield* Form.useInput(props.field, props) } : { optional: false, ...yield* Form.useInput(props.field, props) }
const [issues, isValidating, isSubmitting] = yield* Hooks.useSubscribables( const [issues, isValidating, isSubmitting] = yield* Subscribable.useSubscribables(
props.field.issuesSubscribable, props.field.issuesSubscribable,
props.field.isValidatingSubscribable, props.field.isValidatingSubscribable,
props.field.isSubmittingSubscribable, props.field.isSubmittingSubscribable,
@@ -73,5 +72,4 @@ export class TextFieldFormInput extends Component.makeUntraced("TextFieldFormInp
})} })}
</Flex> </Flex>
) )
} }) {}
) {}