[yoga-15] improve service list rendering
This commit is contained in:
7
yoga-app/src/util/sorting.ts
Normal file
7
yoga-app/src/util/sorting.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import {YogaSingleService_Plain} from "@/types/generated-strapi-interfaces/api/yoga-single-service";
|
||||
|
||||
export function sortServicesByPriority(a: YogaSingleService_Plain, b: YogaSingleService_Plain) {
|
||||
const priorityA = a.priority ?? 0;
|
||||
const priorityB = b.priority ?? 0;
|
||||
return priorityA - priorityB;
|
||||
}
|
||||
Reference in New Issue
Block a user