diff --git a/src/components/StudyChapter.svelte b/src/components/StudyChapter.svelte index 9e66113..ee590ac 100644 --- a/src/components/StudyChapter.svelte +++ b/src/components/StudyChapter.svelte @@ -56,6 +56,7 @@ } onMount(async () => { + info = await getData() chapters = info.num_chapters }) @@ -79,9 +80,12 @@ } chapters = bookInfo.chapters + const p = $page.url + loading = true + const resp = await fetch( - `https://bible-api.deno.dev/api/${versionRead === '' ? 'rv1960' : versionRead}/book/${searchName( + `https://bible-api.deno.dev/api/read/${versionRead === '' ? 'rv1960' : versionRead}/book/${searchName( book )}/${chapter}` ) @@ -89,7 +93,6 @@ if (!resp.ok) { loading = false hasError = true - const errorJson = await resp.json() error = 'No se encontro el capitulo, intentelo mas tarde o revise que sea correcta su busqueda' @@ -118,7 +121,7 @@ localStorage.setItem( 'bookmark', JSON.stringify({ - versionRead, + version: versionRead, chapter, book }) @@ -297,7 +300,7 @@
(selectversionRead = false)}> -

versionRead

+

versiĆ³n