chore: remove dead sort_filter code

This commit is contained in:
2026-06-16 10:20:23 +02:00
committed by Milas Holsting
parent 510549c6ec
commit a37e609880
2 changed files with 0 additions and 27 deletions

View File

@@ -4,7 +4,6 @@ import "./htmx";
import "./dropdown";
import "./anime";
import "./search";
import "./sort_filter";
import "./dedupe";
import "./watchlist";
import "./top_pick_carousel";

View File

@@ -1,26 +0,0 @@
import { onReady } from "./utils";
const initSortFilter = (): void => {
const sortSelect = document.getElementById("sort-select") as HTMLSelectElement | null;
const orderSelect = document.getElementById("order-select") as HTMLSelectElement | null;
const submitForm = (): void => {
const form = document.getElementById("sort-form") as HTMLFormElement | null;
if (form) form.submit();
};
// sync select values to hidden inputs, then submit form
sortSelect?.addEventListener("change", () => {
const input = document.getElementById("sort-input") as HTMLInputElement | null;
if (input) input.value = sortSelect.value;
submitForm();
});
orderSelect?.addEventListener("change", () => {
const input = document.getElementById("order-input") as HTMLInputElement | null;
if (input) input.value = orderSelect.value;
submitForm();
});
};
onReady(initSortFilter);