All files / features/public/components PublicFooter.tsx

100% Statements 5/5
87.5% Branches 7/8
100% Functions 1/1
100% Lines 5/5

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 54 55 56 57 58 59        2x 9x 9x 9x   9x                                                                                                  
import { Link, useParams } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
import { useAppConfig } from '@core/providers/AppConfigProvider'
 
export const PublicFooter = () => {
    const { config } = useAppConfig()
    const { t } = useTranslation('common')
    const { slug } = useParams<{ slug: string }>()
 
    return (
        <footer
            className="py-8 border-t mt-auto text-sm backdrop-blur-md relative z-10 transition-colors duration-300"
            style={{
                backgroundColor: 'hsl(var(--landing-card-glass-bg) / 0.5)',
                color: 'hsl(var(--landing-footer-text))',
                borderColor:
                    'hsl(var(--landing-card-glass-border) / var(--landing-card-glass-border-alpha))',
            }}
        >
            <div className="container mx-auto px-4 flex flex-col md:flex-row items-center justify-between gap-4 opacity-80">
                <p>
                    © {new Date().getFullYear()}{' '}
                    <span className="font-medium">
                        {config.communication?.legalName ||
                            t('common.app_name', 'Fundraising Platform')}
                    </span>
                    . {t('landing.footer.rights')}
                </p>
                <div className="flex items-center gap-6">
                    {config.communication?.website && (
                        <a
                            href={config.communication.website}
                            target="_blank"
                            rel="noreferrer"
                            className="hover:text-primary transition-colors"
                        >
                            {t('landing.footer.website')}
                        </a>
                    )}
                    {config.communication?.supportEmail && (
                        <a
                            href={`mailto:${config.communication.supportEmail}`}
                            className="hover:text-primary transition-colors"
                        >
                            {t('landing.footer.support')}
                        </a>
                    )}
                    <Link
                        to={slug ? `/${slug}/staff` : '/login'}
                        className="sm:hidden hover:text-primary transition-colors"
                    >
                        {t('landing.footer.staff')}
                    </Link>
                </div>
            </div>
        </footer>
    )
}