succuess pt. 10 fix ssr on preview and prod builds
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
import { useSearchParams } from "runed/kit";
|
||||
import { onMount } from "svelte";
|
||||
import {
|
||||
db,
|
||||
ensureSeeded,
|
||||
getAnimeList,
|
||||
getClientDb,
|
||||
searchAnimeByName,
|
||||
} from "$lib/db/client-db";
|
||||
import { AmqBrowseSearchSchema } from "$lib/types/search/amq-browse";
|
||||
@@ -34,6 +34,8 @@
|
||||
try {
|
||||
isSearching = true;
|
||||
|
||||
const { db } = await getClientDb();
|
||||
|
||||
if (!q) {
|
||||
anime = await getAnimeList(db, 20);
|
||||
} else {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from "svelte";
|
||||
import { page } from "$app/state";
|
||||
import { db, ensureSeeded } from "$lib/db/client-db";
|
||||
import { ensureSeeded, getClientDb } from "$lib/db/client-db";
|
||||
import { getAnimeWithSongsByAnnId } from "$lib/db/client-db/queries";
|
||||
import { seasonName } from "$lib/utils/amq";
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
}
|
||||
|
||||
try {
|
||||
const { db } = await getClientDb();
|
||||
await ensureSeeded();
|
||||
const res = await getAnimeWithSongsByAnnId(db, annId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user