version two
Some checks failed
deploy to production / deploy (push) Failing after 31s

This commit is contained in:
2023-11-12 11:45:32 +00:00
parent 92ca030e6c
commit 9d58febf4d
18 changed files with 110 additions and 47 deletions

View File

@@ -4,9 +4,10 @@
let nextpage = $navigation?.pages[0]
$: nextpage = $navigation?.pages[0]
function getNextPage(pages) {
console.log(pages, "pages")
if (location.pathname == "/" || location.pathname == "") return
if (location.pathname == "/" || location.pathname == "") {
$navigation?.pages?.length > 1 ? (nextpage = $navigation?.pages[1]) : (nextpage = $navigation?.pages[0])
return
}
let currPage = pages.find(
(page) => Object.values($pages)?.find((o) => o.id == page.page)?.path == location.pathname
)