mirror of
https://github.com/Hackdex-App/hackdex-website.git
synced 2026-03-28 13:15:13 -05:00
Add alphabetical sorting to DiscoverBrowser
This commit is contained in:
parent
acff75da0c
commit
cf87e1d1ff
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user