Skip to content

Commit

Permalink
fix(islamic-website): remove facebook link from footer
Browse files Browse the repository at this point in the history
  • Loading branch information
olegshilov committed Jan 24, 2024
1 parent 8e56bcc commit a8a4af3
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 59 deletions.
40 changes: 31 additions & 9 deletions apps/islamic-website/components/footer/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import { useMemo } from 'react';
import { Container } from '@haqq/islamic-website-ui-kit';
import { ReactNode, useMemo } from 'react';
import { useTranslations } from 'next-intl';
import Image from 'next/image';
import { SocialIconLink, SocialIconLinkProps } from './social-links';
import { createSharedPathnamesNavigation } from 'next-intl/navigation';
import {
Container,
DiscordIcon,
GithubIcon,
LinkedinIcon,
MediumIcon,
TelegramIcon,
TwitterIcon,
YoutubeIcon,
} from '@haqq/islamic-website-ui-kit';

const { Link } = createSharedPathnamesNavigation({
locales: ['en', 'ar', 'id'],
Expand All @@ -15,6 +23,16 @@ interface FooterNavLink {
title: string;
}

const SOCIAL_ICONS: Record<string, ReactNode> = {
youtube: <YoutubeIcon />,
discord: <DiscordIcon />,
github: <GithubIcon />,
linkedin: <LinkedinIcon />,
medium: <MediumIcon />,
telegram: <TelegramIcon />,
twitter: <TwitterIcon />,
};

type FooterNavLinks = Array<Array<FooterNavLink>>;

function FooterNavLink({
Expand Down Expand Up @@ -124,7 +142,7 @@ const footerNavLinks: FooterNavLinks = [
export function Footer({
socialLinks,
}: {
socialLinks: SocialIconLinkProps[];
socialLinks: { id: string; title: string; url: string }[];
}) {
const t = useTranslations('footer');

Expand Down Expand Up @@ -185,12 +203,16 @@ export function Footer({
<div className="flex flex-wrap items-center gap-x-[14px] gap-y-[12px] text-white">
{socialLinks.map(({ id, url, title }) => {
return (
<SocialIconLink
id={id}
key={title}
url={url}
<Link
title={title}
/>
href={url}
key={`${id}-${title}`}
target="_blank"
rel="noopener noreferrer"
className="transition-colors duration-150 ease-in hover:text-[#18FFAC]"
>
{SOCIAL_ICONS[id]}
</Link>
);
})}
</div>
Expand Down
45 changes: 0 additions & 45 deletions apps/islamic-website/components/footer/social-links.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions apps/islamic-website/social-links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ export const SOCIAL_LINKS = [
url: 'https://discord.gg/islamiccoin',
title: 'Discord',
},
{
id: 'facebook',
url: 'https://www.facebook.com/groups/islamiccoin',
title: 'Facebook',
},
{
id: 'github',
url: 'https://github.com/haqq-network',
Expand Down

0 comments on commit a8a4af3

Please sign in to comment.