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

This commit is contained in:
Julien Valverdé
2025-07-06 19:09:03 +02:00
parent 5c4692e4e4
commit cc67e2d93f

View File

@@ -57,6 +57,7 @@ export const Todo = Component.make(function* Todo(props: TodoProps) {
{props._tag === "edit" && {props._tag === "edit" &&
<Flex direction="column" justify="center" align="center" gap="1"> <Flex direction="column" justify="center" align="center" gap="1">
<IconButton <IconButton
disabled={props.index <= 0}
onClick={() => Runtime.runSync(runtime)( onClick={() => Runtime.runSync(runtime)(
Ref.updateSome(state.ref, todos => Option.gen(function*() { Ref.updateSome(state.ref, todos => Option.gen(function*() {
if (props.index <= 0) if (props.index <= 0)
@@ -75,6 +76,7 @@ export const Todo = Component.make(function* Todo(props: TodoProps) {
</IconButton> </IconButton>
<IconButton <IconButton
disabled={props.index >= todosSize}
onClick={() => Runtime.runSync(runtime)( onClick={() => Runtime.runSync(runtime)(
Ref.updateSome(state.ref, todos => Option.gen(function*() { Ref.updateSome(state.ref, todos => Option.gen(function*() {
if (props.index >= Chunk.size(todos)) if (props.index >= Chunk.size(todos))