fix sort and filter

This commit is contained in:
Michael Freno
2025-12-20 01:59:00 -05:00
parent 921863c602
commit c51771dacd
13 changed files with 391 additions and 658 deletions

View File

@@ -1,4 +1,5 @@
import { createSignal, Show } from "solid-js";
import { useSearchParams } from "@solidjs/router";
import type {
Comment,
CommentReaction,
@@ -42,8 +43,10 @@ interface CommentSectionProps {
}
export default function CommentSection(props: CommentSectionProps) {
const [searchParams] = useSearchParams();
const [selectedSorting, setSelectedSorting] = createSignal<SortingMode>(
COMMENT_SORTING_OPTIONS[0].val
(searchParams.sortBy as SortingMode) || COMMENT_SORTING_OPTIONS[0].val
);
const hasComments = () =>