Add alphabetical sorting to DiscoverBrowser

This commit is contained in:
Jared Schoeny 2025-12-18 01:20:38 -10:00
parent acff75da0c
commit cf87e1d1ff

View File

@ -67,6 +67,8 @@ export default function DiscoverBrowser() {
.order("current_patch", { ascending: false, nullsFirst: false });
} else if (sort === "updated") {
query = query.order("updated_at", { ascending: false });
} else if (sort === "alphabetical") {
query = query.order("title", { ascending: true });
} else {
query = query.order("approved_at", { ascending: false });
}
@ -305,6 +307,7 @@ export default function DiscoverBrowser() {
<option value="popular">Most popular</option>
<option value="new">Newest</option>
<option value="updated">Recently updated</option>
<option value="alphabetical">Alphabetical</option>
</select>
</div>