Skip to content

Commit 9b92d35

Browse files
authored
moved the Discord icon to a separate component (#2040)
1 parent cf5cf58 commit 9b92d35

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

src/components/client/layout/Footer/SocialIcons.tsx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Facebook, LinkedIn, YouTube, Instagram } from '@mui/icons-material'
2-
import Image from 'next/image'
32

43
import { socialUrls } from 'common/routes'
54
import ExternalLink from 'components/common/ExternalLink'
5+
import DiscordIcon from 'components/common/DiscordIcon'
66
import { useTranslation } from 'next-i18next'
77

88
import { SocialIconsWrapper } from './Footer.styled'
@@ -27,18 +27,8 @@ export const SocialIcons = () => {
2727
aria-label={t('components.footer.social.instagram')}>
2828
<Instagram />
2929
</ExternalLink>
30-
<ExternalLink
31-
href="https://discord.com/invite/nZAeCb9YzP"
32-
aria-label={t('components.footer.social.discord')}>
33-
<svg
34-
className="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium mui-20bmp1-MuiSvgIcon-root"
35-
xmlns="http://www.w3.org/2000/svg"
36-
width="28"
37-
height="28"
38-
viewBox="0 0 640 512"
39-
fill="currentColor">
40-
<path d="M524.531 69.836a1.5 1.5 0 0 0-.764-.7A485.065 485.065 0 0 0 404.081 32.03a1.816 1.816 0 0 0-1.923.91a337.461 337.461 0 0 0-14.9 30.6a447.848 447.848 0 0 0-134.426 0a309.541 309.541 0 0 0-15.135-30.6a1.89 1.89 0 0 0-1.924-.91a483.689 483.689 0 0 0-119.688 37.107a1.712 1.712 0 0 0-.788.676C39.068 183.651 18.186 294.69 28.43 404.354a2.016 2.016 0 0 0 .765 1.375a487.666 487.666 0 0 0 146.825 74.189a1.9 1.9 0 0 0 2.063-.676A348.2 348.2 0 0 0 208.12 430.4a1.86 1.86 0 0 0-1.019-2.588a321.173 321.173 0 0 1-45.868-21.853a1.885 1.885 0 0 1-.185-3.126a251.047 251.047 0 0 0 9.109-7.137a1.819 1.819 0 0 1 1.9-.256c96.229 43.917 200.41 43.917 295.5 0a1.812 1.812 0 0 1 1.924.233a234.533 234.533 0 0 0 9.132 7.16a1.884 1.884 0 0 1-.162 3.126a301.407 301.407 0 0 1-45.89 21.83a1.875 1.875 0 0 0-1 2.611a391.055 391.055 0 0 0 30.014 48.815a1.864 1.864 0 0 0 2.063.7A486.048 486.048 0 0 0 610.7 405.729a1.882 1.882 0 0 0 .765-1.352c12.264-126.783-20.532-236.912-86.934-334.541M222.491 337.58c-28.972 0-52.844-26.587-52.844-59.239s23.409-59.241 52.844-59.241c29.665 0 53.306 26.82 52.843 59.239c0 32.654-23.41 59.241-52.843 59.241m195.38 0c-28.971 0-52.843-26.587-52.843-59.239s23.409-59.241 52.843-59.241c29.667 0 53.307 26.82 52.844 59.239c0 32.654-23.177 59.241-52.844 59.241" />
41-
</svg>
30+
<ExternalLink href={socialUrls.discord} aria-label={t('components.footer.social.discord')}>
31+
<DiscordIcon />
4232
</ExternalLink>
4333
<Subscription />
4434
</SocialIconsWrapper>

src/components/common/DiscordIcon.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { SvgIcon, SvgIconProps } from '@mui/material'
2+
3+
const DiscordIcon = (props: SvgIconProps) => {
4+
return (
5+
<SvgIcon
6+
{...props}
7+
viewBox="0 0 640 512"
8+
className="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium mui-20bmp1-MuiSvgIcon-root"
9+
sx={{
10+
width: 28,
11+
height: 28,
12+
...props.sx,
13+
}}>
14+
<path d="M524.531 69.836a1.5 1.5 0 0 0-.764-.7A485.065 485.065 0 0 0 404.081 32.03a1.816 1.816 0 0 0-1.923.91a337.461 337.461 0 0 0-14.9 30.6a447.848 447.848 0 0 0-134.426 0a309.541 309.541 0 0 0-15.135-30.6a1.89 1.89 0 0 0-1.924-.91a483.689 483.689 0 0 0-119.688 37.107a1.712 1.712 0 0 0-.788.676C39.068 183.651 18.186 294.69 28.43 404.354a2.016 2.016 0 0 0 .765 1.375a487.666 487.666 0 0 0 146.825 74.189a1.9 1.9 0 0 0 2.063-.676A348.2 348.2 0 0 0 208.12 430.4a1.86 1.86 0 0 0-1.019-2.588a321.173 321.173 0 0 1-45.868-21.853a1.885 1.885 0 0 1-.185-3.126a251.047 251.047 0 0 0 9.109-7.137a1.819 1.819 0 0 1 1.9-.256c96.229 43.917 200.41 43.917 295.5 0a1.812 1.812 0 0 1 1.924.233a234.533 234.533 0 0 0 9.132 7.16a1.884 1.884 0 0 1-.162 3.126a301.407 301.407 0 0 1-45.89 21.83a1.875 1.875 0 0 0-1 2.611a391.055 391.055 0 0 0 30.014 48.815a1.864 1.864 0 0 0 2.063.7A486.048 486.048 0 0 0 610.7 405.729a1.882 1.882 0 0 0 .765-1.352c12.264-126.783-20.532-236.912-86.934-334.541M222.491 337.58c-28.972 0-52.844-26.587-52.844-59.239s23.409-59.241 52.844-59.241c29.665 0 53.306 26.82 52.843 59.239c0 32.654-23.41 59.241-52.843 59.241m195.38 0c-28.971 0-52.843-26.587-52.843-59.239s23.409-59.241 52.843-59.241c29.667 0 53.307 26.82 52.844 59.239c0 32.654-23.177 59.241-52.844 59.241" />
15+
</SvgIcon>
16+
)
17+
}
18+
19+
export default DiscordIcon

0 commit comments

Comments
 (0)