export const sortArrayByDate = (_array: any[], _key: string): any[] => {
  console.log("date sorting");
  // return _array.sort((a, b) => {
  //   const x = new Date(a[_key]);
  //   const y = new Date(b[_key]);
  //   return x > y ? -1 : x < y ? 1 : 0;
  // });
  return _array;
};

export const sortArrayByPriority = (_array: any[], _key: string): any[] => {
  console.log("priority sorting");
  // return _array.sort((a, b) => {
  //   const x = new Date(a[_key]);
  //   const y = new Date(b[_key]);
  //   return x > y ? -1 : x < y ? 1 : 0;
  // });
  return _array;
};