• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

alkem-io / client-web / #5940

12 Oct 2023 06:58AM UTC coverage: 6.209%. First build
#5940

Pull #4941

travis-ci

Pull Request #4941: New Navigation: Alkemio menu and User menu

173 of 8293 branches covered (0.0%)

Branch coverage included in aggregate %.

94 of 94 new or added lines in 12 files covered. (100.0%)

1296 of 15365 relevant lines covered (8.43%)

0.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/ui/poweredBy/PoweredBy.tsx
1
import { useTranslation } from 'react-i18next';
2
import { BlockSectionTitle } from '@/core/ui/typography';
3
import LogoPreviewImage from '../logo/logoPreview.svg?react';
4
import LogoImage from '../logo/logo.svg?react';
5
import { gutters } from '@/core/ui/grid/utils';
6
import { Box, BoxProps } from '@mui/material';
7
import { useConfig } from '@/domain/platform/config/useConfig';
×
8
import { ROUTE_HOME } from '@/domain/platform/routes/constants';
×
9
import RouterLink from '@/core/ui/link/RouterLink';
10
import { rem } from '@/core/ui/typography/utils';
×
11
import { PlatformFeatureFlagName } from '@/core/apollo/generated/graphql-schema';
12

13
interface PoweredByProps {
14
  preview?: boolean;
15
  compact?: boolean;
16
}
17

18
const PoweredBy = ({ compact = false, preview = false, sx, ...props }: PoweredByProps & BoxProps) => {
19
  const { t } = useTranslation();
20

21
  const { isFeatureEnabled, locations } = useConfig();
22
  const landingPageUrl = locations?.landing;
23

24
  const hasLandingPage = isFeatureEnabled(PlatformFeatureFlagName.LandingPage);
25

26
  const getLogoHeightGutters = () => {
27
    if (preview) {
28
      return 1.5;
29
    }
30
    if (compact) {
31
      return 0.5;
32
    }
33
    return 0.75;
34
  };
35

36
  return (
37
    <Box
38
      component={RouterLink}
39
      to={hasLandingPage ? landingPageUrl : ROUTE_HOME}
40
      raw={hasLandingPage}
41
      blank={false}
42
      display="flex"
43
      justifyContent="center"
44
      alignItems="center"
45
      gap={gutters(0.5)}
46
      paddingX={gutters(0.5)}
47
      sx={{
48
        svg: {
49
          height: gutters(getLogoHeightGutters()),
50
          width: 'auto',
51
        },
52
        ...sx,
53
      }}
54
      aria-label={t('components.poweredBy.aria-label')}
55
      {...props}
56
    >
57
      <BlockSectionTitle flexShrink={0} textTransform="uppercase" fontSize={compact ? rem(10) : undefined}>
58
        {t('components.poweredBy.label')}
59
      </BlockSectionTitle>
60
      {preview ? <LogoPreviewImage /> : <LogoImage />}
61
    </Box>
62
  );
63
};
64

65
export default PoweredBy;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc