Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
fix: update social icons in footer to link
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuzhy-Deriv committed Dec 1, 2023
1 parent d39bd7d commit 06ed9e0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
6 changes: 4 additions & 2 deletions libs/blocks/src/lib/footer/footer.social.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CustomLink } from '@deriv-com/components';
import { SocialIcons } from './footer-block';
import React from 'react';

export const SocialMediaSection = ({
socialButtons,
Expand All @@ -9,7 +9,9 @@ export const SocialMediaSection = ({
return (
<div className="flex gap-gap-lg max-lg:justify-center">
{socialButtons.map((item) => (
<React.Fragment key={item.href}>{item.icon}</React.Fragment>
<CustomLink href={item.href} target="_blank" key={item.href}>
{item.icon}
</CustomLink>
))}
</div>
);
Expand Down
3 changes: 3 additions & 0 deletions libs/components/src/lib/link/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface CustomLinkProps extends HTMLAttributes<HTMLAnchorElement> {
hasLinkColor?: boolean;
disabled?: boolean;
iconColor?: iconColorVariant;
target?: '_blank' | '_self' | '_parent' | '_top';
}
export type iconColorVariant = 'black' | 'subtle' | 'disabled' | 'default';
export type textSize = 'sm' | 'md' | 'lg';
Expand All @@ -34,6 +35,7 @@ export function CustomLink({
hasHoverDecoration = true,
hasLinkColor = false,
disabled = false,
target = '_self',
children,
...rest
}: CustomLinkProps) {
Expand All @@ -42,6 +44,7 @@ export function CustomLink({
return (
<DerivLink
href={href}
target={target}
className={qtMerge(
'flex',
'text-typography-default',
Expand Down
12 changes: 6 additions & 6 deletions libs/features/src/lib/footer/row/data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,26 +146,26 @@ export const warnText =
export const socialButtons = [
{
icon: <StandaloneFacebookIcon iconSize="md" />,
href: '/fb',
href: 'https://www.facebook.com/derivdotcom',
},
{
icon: <StandaloneInstagramIcon iconSize="md" />,
href: '/insta',
href: 'https://www.instagram.com/deriv_official',
},
{
icon: <StandaloneXTwitterIcon iconSize="md" />,
href: '/twitter',
href: 'https://twitter.com/derivdotcom/',
},
{
icon: <StandaloneYoutubeIcon iconSize="md" />,
href: '/youtube',
href: 'https://www.youtube.com/@deriv',
},
{
icon: <StandaloneLinkedinIcon iconSize="md" />,
href: '/linkedin',
href: 'https://www.linkedin.com/company/derivdotcom/',
},
{
icon: <StandaloneTelegramIcon iconSize="md" />,
href: '/telegram',
href: 'https://t.me/derivdotcomofficial',
},
];

0 comments on commit 06ed9e0

Please sign in to comment.