mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
feat: add ViewTransitions from Astro
Integrate ViewTransitions API from Astro v3. resolve #96
This commit is contained in:
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user