Skip to content

Commit 6ad68fc

Browse files
committed
fix: filter route change replace
1 parent 38f0dc4 commit 6ad68fc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/(protected)/dashboard/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default async function DashboardPage({
7171
sp.set('library_id', libID[0])
7272
}
7373

74-
redirect('?' + sp.toString())
74+
redirect('?' + sp.toString(), RedirectType.replace)
7575
}
7676

7777
const [res, libsRes] = await Promise.all([
@@ -100,7 +100,7 @@ export default async function DashboardPage({
100100
const sp = new URLSearchParams(p)
101101
sp.set('library_id', libraryID)
102102

103-
redirect('/dashboard?' + sp.toString())
103+
redirect('/dashboard?' + sp.toString(), RedirectType.replace)
104104
}
105105

106106
const fromDate = parse(from, 'dd-MM-yyyy', new Date())
@@ -116,7 +116,7 @@ export default async function DashboardPage({
116116
if (range.from) sp.set('from', format(range.from, 'dd-MM-yyyy'))
117117
if (range.to) sp.set('to', format(range.to, 'dd-MM-yyyy'))
118118

119-
redirect('/dashboard?' + sp.toString())
119+
redirect('/dashboard?' + sp.toString(), RedirectType.replace)
120120
}
121121

122122
return (

0 commit comments

Comments
 (0)