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