diff --git a/frontend/src/pages/MyPoints.vue b/frontend/src/pages/MyPoints.vue index d7f94057..5b0affc3 100644 --- a/frontend/src/pages/MyPoints.vue +++ b/frontend/src/pages/MyPoints.vue @@ -84,14 +84,15 @@ const energyPoints = createResource({ order_by: 'creation desc', limit_page_length: 1000 }, - auto: true, + auto: false, onSuccess(data) { console.log('Баллы загружены:', data.length, 'записей') } }) const totalPoints = computed(() => { - return energyPoints.data?.reduce((sum, item) => sum + (item.points || 0), 0) || 0 + const list = Array.isArray(energyPoints.data) ? energyPoints.data : [] + return list.reduce((sum, item) => sum + (item.points || 0), 0) }) const additionalPoints = computed(() => { @@ -100,7 +101,7 @@ const additionalPoints = computed(() => { }) const breadcrumbs = computed(() => [ - { label: 'Главная', route: '/app' }, + { label: 'Главная', route: '/' }, { label: 'Мои баллы' } ])