perf: complete performance audit optimizations
This commit is contained in:
@ -51,7 +51,8 @@ import { ref, onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { busStopsService } from '@/services/busStopsService'
|
||||
import type { BusStop } from '@/types'
|
||||
import BusStopEditor from '@/components/BusStopEditor.vue'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
const BusStopEditor = defineAsyncComponent(() => import('@/components/BusStopEditor.vue'))
|
||||
|
||||
const router = useRouter()
|
||||
const stops = ref<BusStop[]>([])
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import LoginForm from '@/components/auth/LoginForm.vue'
|
||||
import RegisterForm from '@/components/auth/RegisterForm.vue'
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
const LoginForm = defineAsyncComponent(() => import('@/components/auth/LoginForm.vue'))
|
||||
const RegisterForm = defineAsyncComponent(() => import('@/components/auth/RegisterForm.vue'))
|
||||
|
||||
const isLogin = ref(true)
|
||||
const toggleAuth = () => { isLogin.value = !isLogin.value }
|
||||
|
||||
@ -122,11 +122,12 @@ function getCategoryIcon(category?: string | null) {
|
||||
<div
|
||||
v-for="coupon in filteredCoupons"
|
||||
:key="coupon.id"
|
||||
v-memo="[coupon.id]"
|
||||
class="offer-card-new"
|
||||
@click="openCoupon(coupon)"
|
||||
>
|
||||
<div class="offer-image-wrapper">
|
||||
<img :src="getImageUrl(coupon.image_url)" :alt="coupon.title" class="offer-img">
|
||||
<img :src="getImageUrl(coupon.image_url)" :alt="coupon.title" loading="lazy" decoding="async" class="offer-img">
|
||||
<div class="status-badge" :class="{ 'tmr': coupon.title.toLowerCase().includes('mañana') || (coupon.description?.toLowerCase().includes('mañana') ?? false) }">
|
||||
<span class="material-icons">schedule</span>
|
||||
{{ coupon.title.toLowerCase().includes('mañana') ? t('coupons.tomorrow') : t('coupons.active') }}
|
||||
|
||||
@ -5,7 +5,7 @@ import { useI18n } from 'vue-i18n'
|
||||
import { useTaxiStore } from '@/stores/taxi'
|
||||
import { useShuttleStore } from '@/stores/shuttle'
|
||||
import { analyticsService } from '@/services/analyticsService'
|
||||
import type { Taxi, Shuttle } from '@/types'
|
||||
import type { Taxi } from '@/types'
|
||||
import FavoriteButton from '@/components/FavoriteButton.vue'
|
||||
import { getImageUrl } from '@/utils/imageUrl'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user