Hi @devisa , thanks for the post and welcome.
I visited your site and checked the console. The error showing in the console is below.
TypeError: Cannot read properties of null (reading 'sort')
The error above is happening because you are trying to call the sort method on a null or probably undefined instead of an array.
Upon investigating the code in the repository you shared the file where you are trying to call the sort method is the ToDoList.tsx component.
The code below is on line 9, and it is trying to get the todos from the local storage. Since the application is running for the first time, the value that is returned will be null
const storedValue = localStorage.getItem("todo");
The variable updatedList is also dependent on storedValue. Therefore when you call the sort method, an error is thrown.
You can fix the code above to return array if the returned value is null by using the code below.
Hi @devisa , I am glad my suggestions helped you to fix the problem.
Usually when debugging your applications, check the browser console or application console for more information as errors are thrown on the console most of the time.