This commit is contained in:
koreacomp5
2025-11-02 04:59:04 +09:00
parent c6e60cd34d
commit 0bf270d884
3 changed files with 43 additions and 17 deletions

View File

@@ -13,7 +13,7 @@ export function BoardToolbar({ boardId }: { boardId: string }) {
const onChangeSort = (e: React.ChangeEvent<HTMLSelectElement>) => {
const next = new URLSearchParams(sp.toString());
next.set("sort", e.target.value);
router.push(`/boards/${boardId}?${next.toString()}`);
router.push(`/boards/${boardId}?${next.toString()}` , { scroll: false });
};
const onChangePeriod = (e: React.ChangeEvent<HTMLSelectElement>) => {
@@ -26,7 +26,7 @@ export function BoardToolbar({ boardId }: { boardId: string }) {
if (v === "1w") now.setDate(now.getDate() - 7);
if (v === "1m") now.setMonth(now.getMonth() - 1);
if (v === "all") next.delete("start"); else next.set("start", now.toISOString());
router.push(`/boards/${boardId}?${next.toString()}`);
router.push(`/boards/${boardId}?${next.toString()}` , { scroll: false });
};
const onSubmit = (formData: FormData) => {
@@ -41,7 +41,7 @@ export function BoardToolbar({ boardId }: { boardId: string }) {
next.delete("author");
if (text) next.set("q", text); else next.delete("q");
}
router.push(`/boards/${boardId}?${next.toString()}`);
router.push(`/boards/${boardId}?${next.toString()}` , { scroll: false });
};
return (