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">
|
||||
import { building } from '$app/environment';
|
||||
import { fly } from 'svelte/transition';
|
||||
import { quintOut } from 'svelte/easing';
|
||||
import { derived, readable, type Readable } from 'svelte/store';
|
||||
import { page } from '$app/stores';
|
||||
|
||||
import type { Patch } from '$lib/types';
|
||||
@ -20,8 +22,15 @@
|
||||
|
||||
const query = createQuery(['patches'], queries.patches);
|
||||
|
||||
$: selectedPkg = $page.url.searchParams.get('pkg');
|
||||
let searchTerm = $page.url.searchParams.get('s');
|
||||
let searchParams: Readable<URLSearchParams>;
|
||||
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
|
||||
?.replace(/\./g, '')
|
||||
.replace(/\s/g, '')
|
||||
|
@ -1 +0,0 @@
|
||||
export const prerender = false;
|
Loading…
x
Reference in New Issue
Block a user