File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ class CreateTodoContainer extends React.Component {
102102 variables : { id : productId , completed : status === "DONE" } ,
103103 } ) ;
104104 const todos = data . product . todos . map ( t => t ) ; // make a shallow copy otherwise error "Object is not extensible" is thrown
105- todos . push ( createTodo ) ;
105+ todos . unshift ( createTodo ) ;
106106 const newData = {
107107 ...data ,
108108 product : { ...data . product , todos } ,
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ class TodoBoxContainer extends React.Component {
102102 } ) ;
103103
104104 const todos2 = cacheData2 . product . todos . map ( t => t ) ; // make a shallow copy otherwise error "Object is not extensible" is thrown
105- todos2 . push ( {
105+ todos2 . unshift ( {
106106 ...data [ completed ? "uncompleteTodo" : "completeTodo" ] ,
107107 id : todo . id ,
108108 completed_at,
You can’t perform that action at this time.
0 commit comments