import React from 'react'; import { View } from 'react-native'; import { useTheme } from '~/features/theme/ThemeProvider'; import colors from '~/tailwind.config.js'; /** * Skeleton loader for WeeklyChart component */ const WeeklyChartSkeleton: React.FC = () => { const { isDark, themeVariant } = useTheme(); const contentBackgroundColor = isDark ? (colors as any).theme?.extend?.colors?.dark?.[themeVariant]?.contentBackground : (colors as any).theme?.extend?.colors?.[themeVariant]?.contentBackground; const borderColor = isDark ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)'; const skeletonColor = isDark ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.1)'; // Create skeleton bars with different heights for 12 weeks const barHeights = [40, 60, 35, 80, 55, 45, 70, 30, 65, 50, 75, 40]; return ( {/* Chart title skeleton */} {/* Chart container */} {barHeights.map((height, index) => ( {/* Bar skeleton */} ))} {/* Legend skeleton */} ); }; export default WeeklyChartSkeleton;