0.1.0 #1

Merged
Thilawyn merged 81 commits from next into master 2025-07-17 21:17:57 +02:00
Showing only changes of commit edb391c1c0 - Show all commits

View File

@@ -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