feat: add ViewTransitions from Astro

Integrate ViewTransitions API from Astro v3.

resolve #96
This commit is contained in:
satnaing
2023-09-14 14:00:08 +06:30
committed by Sat Naing
parent e486687610
commit cbdaa59bae
11 changed files with 103 additions and 35 deletions
+2 -2
View File
@@ -67,9 +67,9 @@ export default function SearchBar({ searchList }: Props) {
searchParams.set("q", inputVal);
const newRelativePathQuery =
window.location.pathname + "?" + searchParams.toString();
history.replaceState(null, "", newRelativePathQuery);
history.replaceState(history.state, "", newRelativePathQuery);
} else {
history.replaceState(null, "", window.location.pathname);
history.replaceState(history.state, "", window.location.pathname);
}
}, [inputVal]);