Files
dance-lessons-coach/frontend/components/HealthDashboard.vue
Gabriel Radureau 7c3617c9d7
Some checks failed
CI/CD Pipeline / Build Docker Cache (push) Successful in 12s
CI/CD Pipeline / CI Pipeline (push) Failing after 4m34s
CI/CD Pipeline / Trigger Docker Push (push) Has been skipped
♻️ refactor(frontend): split HealthDashboard into smart wrapper + dumb View for state-based stories (#33)
SRP split: HealthDashboardView (presentational, props-based) + HealthDashboard (smart wrapper, useFetch). Enables 4 Storybook stories per state + unit testability per branch. Existing testids preserved, Playwright tests still pass.

Co-authored-by: Gabriel Radureau <arcodange@gmail.com>
Co-committed-by: Gabriel Radureau <arcodange@gmail.com>
2026-05-03 17:55:47 +02:00

14 lines
547 B
Vue

<script setup lang="ts">
import HealthDashboardView, { type HealthInfo } from './HealthDashboardView.vue'
// Wrapper: handles data fetching, delegates rendering to HealthDashboardView.
// Separation of concerns (SRP):
// - HealthDashboard (this) = data layer (useFetch lifecycle)
// - HealthDashboardView = presentation layer (testable in Storybook + e2e)
const { data, pending, error } = await useFetch<HealthInfo>('/api/healthz')
</script>
<template>
<HealthDashboardView :data="data" :pending="pending" :error="error" />
</template>