mirror of
https://github.com/revanced/revanced-website.git
synced 2025-04-29 22:24:31 +02:00
fix(Patches): enable prerendering
This commit is contained in:
parent
0ae8a9b751
commit
d403a265fd
@ -1,6 +1,8 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { building } from '$app/environment';
|
||||||
import { fly } from 'svelte/transition';
|
import { fly } from 'svelte/transition';
|
||||||
import { quintOut } from 'svelte/easing';
|
import { quintOut } from 'svelte/easing';
|
||||||
|
import { derived, readable, type Readable } from 'svelte/store';
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
|
|
||||||
import type { Patch } from '$lib/types';
|
import type { Patch } from '$lib/types';
|
||||||
@ -20,8 +22,15 @@
|
|||||||
|
|
||||||
const query = createQuery(['patches'], queries.patches);
|
const query = createQuery(['patches'], queries.patches);
|
||||||
|
|
||||||
$: selectedPkg = $page.url.searchParams.get('pkg');
|
let searchParams: Readable<URLSearchParams>;
|
||||||
let searchTerm = $page.url.searchParams.get('s');
|
if (building) {
|
||||||
|
searchParams = readable(new URLSearchParams());
|
||||||
|
} else {
|
||||||
|
searchParams = derived(page, ($page) => $page.url.searchParams);
|
||||||
|
}
|
||||||
|
|
||||||
|
$: selectedPkg = $searchParams.get('pkg');
|
||||||
|
let searchTerm = $searchParams.get('s');
|
||||||
let searchTermFiltered = searchTerm
|
let searchTermFiltered = searchTerm
|
||||||
?.replace(/\./g, '')
|
?.replace(/\./g, '')
|
||||||
.replace(/\s/g, '')
|
.replace(/\s/g, '')
|
||||||
|
@ -1 +0,0 @@
|
|||||||
export const prerender = false;
|
|
Loading…
x
Reference in New Issue
Block a user