All files / src/app/layout/sidebar SidebarEnvironment.tsx

100% Statements 53/53
100% Branches 1/1
100% Functions 1/1
100% Lines 53/53

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 541x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x  
/**
 * @file SidebarEnvironment.tsx
 * @module app/layout/sidebar/SidebarEnvironment
 *
 * @summary
 * Environment and version metadata display component for sidebar footer.
 * Shows application environment and version information.
 *
 * @enterprise
 * - Hardcoded environment and version (configured via i18n keys)
 * - Clean metadata display with labels and values
 * - i18n support for future environment changes
 * - Consistent typography and spacing
 * - Full TypeDoc coverage for metadata display
 */
 
import { Box, Typography } from '@mui/material';
import { useTranslation } from 'react-i18next';
 
/**
 * Environment and version metadata display component.
 *
 * Renders application environment (e.g., Production) and version.
 * Uses i18n for customizable display values.
 *
 * @returns JSX element rendering environment metadata section
 *
 * @example
 * ```tsx
 * <SidebarEnvironment />
 * // Displays: Environment: Production (Koyeb), Version: 1.0.0
 * ```
 */
export default function SidebarEnvironment() {
  const { t } = useTranslation(['common']);
 
  return (
    <Box>
      <Typography variant="caption" sx={{ fontWeight: 600, display: 'block', mb: 0.5 }}>
        {t('footer:meta.environment', 'Environment:')}
      </Typography>
      <Typography variant="caption" color="text.secondary" display="block">
        {t('app.environment', 'Production (Koyeb)')}
      </Typography>
      <Typography variant="caption" sx={{ fontWeight: 600, display: 'block', mt: 0.5, mb: 0.5 }}>
        {t('footer:meta.version', 'Version:')}
      </Typography>
      <Typography variant="caption" color="text.secondary" display="block">
        {t('app.version', '1.0.0')}
      </Typography>
    </Box>
  );
}