import styled from '@emotion/styled'; import Box from '@mui/material/Box'; import Divider from '@mui/material/Divider'; import Link from '@mui/material/Link'; import Typography from '@mui/material/Typography'; import useAutomatischConfig from 'hooks/useAutomatischConfig'; import useFormatMessage from 'hooks/useFormatMessage'; const LogoImage = styled('img')(() => ({ maxWidth: 'auto', height: 22, })); const LayoutFooter = () => { const { data: config } = useAutomatischConfig(); const formatMessage = useFormatMessage(); if (config?.data.enableFooter !== true) return null; const links = [ { key: 'docs', show: !!config.data.footerDocsUrl, href: config.data.footerDocsUrl, text: formatMessage('footer.docsLinkText'), }, { key: 'terms-of-services', show: !!config.data.footerTosUrl, href: config.data.footerTosUrl, text: formatMessage('footer.tosLinkText'), }, { key: 'privacy-policy', show: !!config.data.footerPrivacyPolicyUrl, href: config.data.footerPrivacyPolicyUrl, text: formatMessage('footer.privacyPolicyLinkText'), }, { key: 'imprint', show: !!config.data.footerImprintUrl, href: config.data.footerImprintUrl, text: formatMessage('footer.imprintLinkText'), }, ]; return ( theme.palette.footer.main, color: (theme) => theme.palette.footer.text, }} >
{config.data.footerLogoSvgData && ( <> )}
{config.data.footerCopyrightText && ( {config.data.footerCopyrightText} )}
{links .filter((link) => link.show) .map((link) => ( {link.text} ))}
); }; export default LayoutFooter;