How to sort an array of object values based on string?

Here is a running example of sorting an array object.
https://replit.com/@RA68/creact-react-app#src/App.js
The most important thing is to create your sortOrder.
Here I created an array called sortOrder where I want my objects to be sorted in the order of active, draft and closed.