Skip to content

armgit / lyftr

Public Imported from GitHub
0

Self-hosted fitness tracker. Log workouts, track nutrition, and monitor progress. Docker deployment, mobile-friendly.

1.0 KB
Raw Blame
import { router } from 'expo-router'
import { useTranslation } from '@lyftr/shared'
import { Plus } from 'lucide-react-native'
import { IconButton, ListScreenSkeleton } from '../ui'

// Initial-load skeleton for the Programs list — a thin wrapper over the shared
// ListScreenSkeleton (header · 2 stats · search · card rows), matching the Programs
// layout so content fills into its own shape rather than popping after a blank/spinner.
// The PageHeader + its "New Program" action are the REAL controls, live immediately;
// only the data-shaped regions are placeholders. Mirrors WorkoutsSkeleton.
export function ProgramsSkeleton() {
  const { t } = useTranslation()
  return (
    <ListScreenSkeleton
      title={t('programs.title')}
      subtitle={t('programs.subtitle')}
      statCount={2}
      action={
        <IconButton
          icon={Plus}
          label={t('programs.newProgram')}
          variant="solid"
          size="md"
          onPress={() => router.push('/programs/new')}
        />
      }
    />
  )
}