mirror of
https://github.com/ReVanced/revanced-website.git
synced 2026-01-21 02:03:56 +00:00
fix(Search): replace window.history.pushState with goto
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
<script lang="ts">
|
||||
import { fade } from 'svelte/transition';
|
||||
import { quintOut } from 'svelte/easing';
|
||||
import { page } from '$app/stores';
|
||||
import { goto } from '$app/navigation';
|
||||
|
||||
export let title: string;
|
||||
export let searchTerm: string | null;
|
||||
export let searchTermFiltered: string | undefined;
|
||||
import { fade } from 'svelte/transition';
|
||||
import { quintOut } from 'svelte/easing';
|
||||
|
||||
function clear() {
|
||||
searchTerm = '';
|
||||
searchTermFiltered = '';
|
||||
window.history.pushState(null, '', window.location.href.split('?')[0])
|
||||
goto($page.url.pathname)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user