File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
demos/nextjs-supabase-todolist/src
app/views/todo-lists/edit Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ const TodoEditSection = () => {
5555 updatedRecord . completed_at = new Date ( ) . toISOString ( ) ;
5656 updatedRecord . completed_by = userID ;
5757 } else {
58- updatedRecord . completed_at = undefined ;
59- updatedRecord . completed_by = undefined ;
58+ updatedRecord . completed_at = null ;
59+ updatedRecord . completed_by = null ;
6060 }
6161 await powerSync . execute (
6262 `UPDATE ${ TODOS_TABLE }
@@ -111,7 +111,7 @@ const TodoEditSection = () => {
111111 key = { r . id }
112112 description = { r . description }
113113 onDelete = { ( ) => deleteTodo ( r . id ) }
114- isComplete = { r . completed }
114+ isComplete = { r . completed == 1 }
115115 toggleCompletion = { ( ) => toggleCompletion ( r , ! r . completed ) }
116116 />
117117 ) ) }
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank';
66import CheckBoxIcon from '@mui/icons-material/CheckBox' ;
77
88export type TodoItemWidgetProps = {
9- description : string ;
9+ description : string | null ;
1010 isComplete : boolean ;
1111 onDelete : ( ) => void ;
1212 toggleCompletion : ( ) => void ;
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export function TodoListsWidget(props: TodoListsWidgetProps) {
4242 { listRecords . map ( ( r ) => (
4343 < ListItemWidget
4444 key = { r . id }
45- title = { r . name }
45+ title = { r . name ?? '' }
4646 description = { description ( r . total_tasks , r . completed_tasks ) }
4747 selected = { r . id == props . selectedId }
4848 onDelete = { ( ) => deleteList ( r . id ) }
You can’t perform that action at this time.
0 commit comments