feat(catalog): add reply-count sorting mode

This commit is contained in:
plebeius
2026-02-23 17:09:26 +08:00
parent 7eac1d8dff
commit 24d7b3e057
6 changed files with 175 additions and 17 deletions
+5 -2
View File
@@ -1,8 +1,11 @@
import { create } from 'zustand';
/** Catalog-only sort state. Used by catalog view sort selector. */
export type CatalogSortType = 'active' | 'new' | 'replyCount';
interface SortingStore {
sortType: 'active' | 'new';
setSortType: (type: 'active' | 'new') => void;
sortType: CatalogSortType;
setSortType: (type: CatalogSortType) => void;
}
const useSortingStore = create<SortingStore>((set) => ({