1- import useTranslation from 'next-translate/useTranslation'
2- import Image from 'next/image'
1+ import { useTranslations } from 'next-intl'
32import styled from 'styled-components'
4- import { CLUSTER_NAME , isMainlandChinaCluster } from 'utils/config'
53
64import CookieConsent from 'components/cookie-consent'
75import MaxWidthWrapper from 'components/max-width-wrapper'
86
9- import digitalOceanReferralBadge from './digitalocean-referral-badge.svg'
10-
117const Wrapper = styled . div `
128 padding: 2rem 0;
139 font-size: 0.875rem;
@@ -24,12 +20,6 @@ const Copyright = styled.div`
2420 opacity: 0.8;
2521`
2622
27- const ICPLicense = styled . a `
28- opacity: 0.5;
29- color: var(--color-text);
30- text-decoration: none;
31- `
32-
3323const Links = styled . ol `
3424 display: flex;
3525 gap: 1rem;
@@ -51,47 +41,24 @@ const Links = styled.ol`
5141 }
5242`
5343
54- const DigitalOceanBadge = styled . a `
55- display: flex;
56- align-items: center;
57- `
58-
5944const Footer = ( ) => {
60- const { t } = useTranslation ( 'common' )
61-
62- const showDigitalOceanBadge = CLUSTER_NAME === 'digitalocean'
45+ const t = useTranslations ( 'common' )
6346
6447 return (
6548 < >
6649 < Wrapper >
6750 < MaxWidthWrapper >
6851 < Copyright > © 2021-{ new Date ( ) . getFullYear ( ) } LinearMouse</ Copyright >
6952
70- { isMainlandChinaCluster && (
71- < ICPLicense href = "https://beian.miit.gov.cn" target = "_blank" rel = "noreferrer noopener" >
72- 沪ICP备2023003051号
73- </ ICPLicense >
74- ) }
75-
7653 < Links >
7754 < a href = "https://crowdin.com/project/linearmouse" target = "_blank" rel = "noreferrer noopener" >
7855 { t ( 'footer.help_translate' ) }
7956 </ a >
8057 < a href = "/privacy.html" > { t ( 'footer.privacy_policy' ) } </ a >
8158 </ Links >
82-
83- { showDigitalOceanBadge && (
84- < DigitalOceanBadge
85- href = "https://www.digitalocean.com/?refcode=f272815c14b2& utm_campaign = Referral_Invite & utm_source = LinearMouse "
86- target = "_blank"
87- rel = "noopener"
88- >
89- < Image alt = "DigitalOcean Referral Badge" width = { 133 } height = { 43 } src = { digitalOceanReferralBadge } />
90- </ DigitalOceanBadge >
91- ) }
9259 </ MaxWidthWrapper >
9360 </ Wrapper >
94- { ! isMainlandChinaCluster && < CookieConsent /> }
61+ < CookieConsent />
9562 </ >
9663 )
9764}
0 commit comments