diff --git a/quartz/util/function.ts b/quartz/util/function.ts new file mode 100644 index 0000000000000..7cba701df8649 --- /dev/null +++ b/quartz/util/function.ts @@ -0,0 +1,16 @@ +import { secretPage } from "../../quartz.layout"; +import { FileNode, Options } from "../components/ExplorerNode" + +export const sortFn: Options["sortFn"] = (a: FileNode, b: FileNode) => { + if (a.order && b.order) { + return a.order - b.order; + } else if (a.order) { + return -1; + } + return 1; +}; + + +export const filterFn = (node: FileNode) => { + return !secretPage.has(node.name) +} \ No newline at end of file