Example cleanup
All checks were successful
Lint / lint (push) Successful in 11s

This commit is contained in:
Julien Valverdé
2025-08-09 01:16:13 +02:00
parent ad9217999a
commit 8443da4235
6 changed files with 22 additions and 24 deletions

View File

@@ -1,5 +1,5 @@
import { TextField } from "@radix-ui/themes"
import { Effect, Schema } from "effect"
import { Schema } from "effect"
import { Component } from "effect-fc"
import { useInput } from "effect-fc/hooks"
@@ -8,8 +8,8 @@ export namespace TextInput {
export interface Props<A, R> extends Omit<useInput.Options<A, R>, "schema">, TextField.RootProps {}
}
export const TextInput = <A, R>(schema: Schema.Schema<A, string, R>) => Component.make(
Effect.fnUntraced(function*(props: TextInput.Props<A, R>) {
export const TextInput = <A, R>(schema: Schema.Schema<A, string, R>) => Component.makeUntraced(
function* TextInput(props: TextInput.Props<A, R>) {
const input = yield* useInput({ ...props, schema })
return (
<TextField.Root
@@ -18,5 +18,5 @@ export const TextInput = <A, R>(schema: Schema.Schema<A, string, R>) => Componen
</TextField.Root>
)
})
}
)