sub
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user