@@ -76,10 +76,10 @@ export const Todo = Component.make(function* Todo(props: TodoProps) {
|
|||||||
</IconButton>
|
</IconButton>
|
||||||
|
|
||||||
<IconButton
|
<IconButton
|
||||||
disabled={props.index >= todosSize}
|
disabled={props.index >= todosSize - 1}
|
||||||
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) - 1)
|
||||||
return yield* Option.none()
|
return yield* Option.none()
|
||||||
|
|
||||||
const toSwapIndex = props.index + 1
|
const toSwapIndex = props.index + 1
|
||||||
|
|||||||
Reference in New Issue
Block a user