doc.silverstripe.org/src/utils/sortFiles.ts
Aaron Carlino 8ffc3eeb5b
WIP: Add userhelp to new site (#216)
* Docs/userguide switching

* Initial commit of userdocs merge

* Remove service worker, fix rendering

* Remove limited sources

* UX improvements per Paul design

* Tweak version select for FF

* Fix mobile view

* Final tweaks to UI

* Tweaks to search bar, clean up conflicts

* Fix icons

* Hide search if no API key
2019-12-19 11:54:23 +13:00

10 lines
300 B
TypeScript

import { SilverstripeDocument } from "../types";
const sortFiles = (a: SilverstripeDocument, b: SilverstripeDocument): number => {
if (a.isIndex !== b.isIndex) {
//return a.isIndex ? -1 : 1;
}
return a.fileAbsolutePath > b.fileAbsolutePath ? 1 : -1;
};
export default sortFiles;