Bufixes, prefetching root page
All checks were successful
pipeline / build-and-push-images (push) Successful in 1m31s
All checks were successful
pipeline / build-and-push-images (push) Successful in 1m31s
This commit is contained in:
@@ -82,6 +82,11 @@ watch(searchText, (newTerm) => {
|
||||
debouncedSearch(newTerm);
|
||||
});
|
||||
|
||||
// Watch for changes in champions data and update filtered champions
|
||||
watch(champions, (newChampions) => {
|
||||
filteredChampions.value = [...newChampions];
|
||||
}, { immediate: true });
|
||||
|
||||
// Navigation
|
||||
async function navigateToChampion(championAlias: string): Promise<void> {
|
||||
try {
|
||||
|
||||
@@ -30,9 +30,13 @@ if(route.path.startsWith("/tierlist/")) {
|
||||
<template>
|
||||
<div class="navbar-container">
|
||||
|
||||
<NuxtLink style="display: flex; width: fit-content; text-decoration: none; align-items: center; margin-left: 10px;" to="/">
|
||||
<NuxtImg format="webp" id="navbar-logo-img"
|
||||
src="/buildpath-high-resolution-logo-transparent.png" />
|
||||
<NuxtLink
|
||||
style="display: flex; width: fit-content; text-decoration: none; align-items: center; margin-left: 10px;"
|
||||
to="/"
|
||||
prefetch
|
||||
>
|
||||
<NuxtImg format="webp" id="navbar-logo-img"
|
||||
src="/buildpath-high-resolution-logo-transparent.png" />
|
||||
</NuxtLink>
|
||||
|
||||
<div v-for="(lane, i) in championLanes" style="display: flex; align-items: center; margin-left: 20px;">
|
||||
|
||||
@@ -5,7 +5,7 @@ export default defineNuxtConfig({
|
||||
css: ['~/assets/css/main.css'],
|
||||
|
||||
routeRules: {
|
||||
'/' : {prerender: false, swr: true, ssr: true},
|
||||
'/' : {prerender: false, swr: true},
|
||||
'/champion/**' : {swr: true}
|
||||
},
|
||||
|
||||
|
||||
@@ -5,6 +5,13 @@ const championAlias = route.params.alias as string
|
||||
const { data : championData } : {data : Ref<ChampionData>} = await useFetch("/api/champion/" + championAlias.toLowerCase())
|
||||
const championId = championData.value.id
|
||||
|
||||
// Prefetch home page for faster navigation
|
||||
useHead({
|
||||
link: [
|
||||
{ rel: 'prefetch', href: '/' }
|
||||
]
|
||||
})
|
||||
|
||||
defineOgImageComponent('Champion', {
|
||||
title: championData.value.name,
|
||||
id: championId,
|
||||
|
||||
Reference in New Issue
Block a user