Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/Footer/__tests__/Footer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Footer Component', () => {
render(<Footer />);
const communityButton = screen.getByText(/Join our community/);
fireEvent.click(communityButton);
expect(window.open).toHaveBeenCalledWith('https://deriv.vanillacommunity.com/', '_blank');
expect(window.open).toHaveBeenCalledWith('https://community.deriv.com/c/developers/48', '_blank');
});

it('opens Telegram in a new tab when Telegram button is clicked', () => {
Expand Down
359 changes: 184 additions & 175 deletions src/components/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ const Footer = () => {
header: 'API',
content: (
<ul className={styles.List}>
<li>
<a href={footer_links.documentation} className={styles.Link}>
<Translate>Documentation</Translate>
</a>
</li>
<li>
<a href={footer_links.dashboard} className={styles.Link}>
<Translate>Dashboard</Translate>
Expand All @@ -53,6 +48,15 @@ const Footer = () => {
<Translate>API explorer</Translate>
</a>
</li>
<li>
<a
href={footer_links.documentation}
target='_blank'
rel="noreferrer"
className={styles.Link}>
<Translate>Documentation</Translate> <LabelPairedArrowUpRightSmRegularIcon />
</a>
</li>
<li>
<a
href='https://deriv.com/derivtech'
Expand Down Expand Up @@ -112,186 +116,191 @@ const Footer = () => {

return (
<div className='container'>
<section className={styles.FooterContainer} data-testid='footer-text'>
<div className={styles.FooterBody}>
<div className={styles.LogoWrapper}>
<div className={styles.FooterLogo}>
<GrayLogo />
<section className={styles.FooterContainer} data-testid='footer-text'>
<div className={styles.FooterBody}>
<div className={styles.LogoWrapper}>
<div className={styles.FooterLogo}>
<GrayLogo />
</div>
</div>
</div>
<div className={styles.FooterSection}>
<section className={styles.Section1} data-testid='API-section'>
<Heading.H6 data-testid='API-section'>
<Translate>API</Translate>
</Heading.H6>
<ul className={styles.List}>
<li>
<a href={footer_links.documentation} className={styles.Link}>
<Text className={styles.labelcolor} size='sm'>
<Translate>Documentation</Translate>
</Text>
</a>
</li>
<li>
<a href={footer_links.dashboard} className={styles.Link}>
<Text size='sm' className={styles.labelcolor}>
<Translate>Dashboard</Translate>
</Text>
</a>
</li>
<li>
<a href={footer_links.api_explorer} className={styles.Link}>
<Text size='sm' className={styles.labelcolor}>
<Translate>API explorer</Translate>
</Text>
</a>
</li>
<li>
<a
href='https://deriv.com/derivtech'
target='_blank'
className={styles.Link}
rel='noreferrer'
>
<Text size='sm' className={styles.labelcolor}>
<Translate>Deriv Tech</Translate>
</Text>
<LabelPairedArrowUpRightSmRegularIcon />
</a>
</li>
<li>
<a
href='https://hackerone.com/deriv?type=team'
target='_blank'
className={styles.Link}
rel='noreferrer'
>
<Text size='sm' className={styles.labelcolor}>
<Translate>Bug bounty</Translate>
</Text>
<LabelPairedArrowUpRightSmRegularIcon />
</a>
</li>
</ul>
</section>
<section className={styles.Section1}>
<Heading.H6>Deriv.com</Heading.H6>
<ul className={styles.List}>
<li>
<a
href={footer_links.root}
target='_blank'
className={styles.Link}
rel='noreferrer'
<div className={styles.FooterSection}>
<section className={styles.Section1} data-testid='API-section'>
<Heading.H6 data-testid='API-section'>
<Translate>API</Translate>
</Heading.H6>
<ul className={styles.List}>
<li>
<a href={footer_links.dashboard} className={styles.Link}>
<Text size='sm' className={styles.labelcolor}>
<Translate>Dashboard</Translate>
</Text>
</a>
</li>
<li>
<a href={footer_links.api_explorer} className={styles.Link}>
<Text size='sm' className={styles.labelcolor}>
<Translate>API explorer</Translate>
</Text>
</a>
</li>
<li>
<a
href={footer_links.documentation}
target='_blank'
rel="noreferrer"
className={styles.Link}>
<Text className={styles.labelcolor} size='sm'>
<Translate>Documentation</Translate>
</Text>
<LabelPairedArrowUpRightSmRegularIcon />
</a>
</li>
<li>
<a
href='https://deriv.com/derivtech'
target='_blank'
className={styles.Link}
rel='noreferrer'
>
<Text size='sm' className={styles.labelcolor}>
<Translate>Deriv Tech</Translate>
</Text>
<LabelPairedArrowUpRightSmRegularIcon />
</a>
</li>
<li>
<a
href='https://hackerone.com/deriv?type=team'
target='_blank'
className={styles.Link}
rel='noreferrer'
>
<Text size='sm' className={styles.labelcolor}>
<Translate>Bug bounty</Translate>
</Text>
<LabelPairedArrowUpRightSmRegularIcon />
</a>
</li>
</ul>
</section>
<section className={styles.Section1}>
<Heading.H6>Deriv.com</Heading.H6>
<ul className={styles.List}>
<li>
<a
href={footer_links.root}
target='_blank'
className={styles.Link}
rel='noreferrer'
>
<Text size='sm' className={styles.labelcolor}>
<Translate>Homepage</Translate>
</Text>
<LabelPairedArrowUpRightSmRegularIcon />
</a>
</li>
<li>
<a
href={footer_links.who_we_are}
target='_blank'
className={styles.Link}
rel='noreferrer'
>
<Text size='sm' className={styles.labelcolor}>
<Translate>Who we are</Translate>
</Text>
<LabelPairedArrowUpRightSmRegularIcon />
</a>
</li>
<li>
<a
href={footer_links.contact_us}
target='_blank'
className={styles.Link}
rel='noreferrer'
>
<Text
size='sm'
color='var(--component-textIcon-normal-prominent)'
className={styles.labelcolor}
>
<Translate>Contact us</Translate>
</Text>
<LabelPairedArrowUpRightSmRegularIcon />
</a>
</li>
</ul>
</section>
<div className={styles.MobileAccordion}>
<CustomAccordion items={accordionItems} />
</div>
<div className={styles.Box} data-testid='get-connected'>
<Heading.H5 className={styles.SectionTitle}>
<Translate>Get connected</Translate>
</Heading.H5>
<p className={styles.SectionContent}>
<Text size='sm'>
<Translate>Discuss ideas and share solutions with developers worldwide.</Translate>
</Text>
</p>
<div className={styles.CommunityButton} data-testid='community-button'>
<Button
variant='secondary'
color='black'
fullWidth
onClick={() => {
window.open('https://community.deriv.com/c/developers/48', '_blank');
}}
>
<Text size='sm' className={styles.labelcolor}>
<Translate>Homepage</Translate>
</Text>
<LabelPairedArrowUpRightSmRegularIcon />
</a>
</li>
<li>
<a
href={footer_links.who_we_are}
target='_blank'
className={styles.Link}
rel='noreferrer'
<Translate>Join our community</Translate>
</Button>
<Button
variant='secondary'
color='black'
fullWidth
onClick={() => {
window.open('https://t.me/+g6FV5tFY1u9lZGE1', '_blank');
}}
>
<Text size='sm' className={styles.labelcolor}>
<Translate>Who we are</Translate>
</Text>
<LabelPairedArrowUpRightSmRegularIcon />
</a>
</li>
<li>
<a
href={footer_links.contact_us}
target='_blank'
className={styles.Link}
rel='noreferrer'
>
<Text
size='sm'
color='var(--component-textIcon-normal-prominent)'
className={styles.labelcolor}
>
<Translate>Contact us</Translate>
<SocialTelegramBlackIcon fill='#000000' iconSize='xs' />
<Translate>Telegram</Translate>
</Button>
</div>
</div>
<div className={styles.Box}>
<Heading.H5 className={styles.SectionTitle}>
<Translate>We're here to help</Translate>
</Heading.H5>
<p className={styles.SectionContent}>
<Text size='sm' style={{ display: 'inline' }}>
<Translate>Email us at</Translate>{' '}
</Text>
<a href='mailto:api-support@deriv.com' style={{ display: 'inline' }}>
<Text size='sm' style={{ display: 'inline' }}>
<Translate>api-support@deriv.com </Translate>
</Text>
<LabelPairedArrowUpRightSmRegularIcon />
</a>
</li>
</ul>
</section>
<div className={styles.MobileAccordion}>
<CustomAccordion items={accordionItems} />
</div>
<div className={styles.Box} data-testid='get-connected'>
<Heading.H5 className={styles.SectionTitle}>
<Translate>Get connected</Translate>
</Heading.H5>
<p className={styles.SectionContent}>
<Text size='sm'>
<Translate>Discuss ideas and share solutions with developers worldwide.</Translate>
</Text>
</p>
<div className={styles.CommunityButton} data-testid='community-button'>
<Button
variant='secondary'
color='black'
fullWidth
onClick={() => {
window.open('https://deriv.vanillacommunity.com/', '_blank');
}}
>
<Translate>Join our community</Translate>
</Button>
<Button
variant='secondary'
color='black'
fullWidth
onClick={() => {
window.open('https://t.me/+g6FV5tFY1u9lZGE1', '_blank');
}}
>
<SocialTelegramBlackIcon fill='#000000' iconSize='xs' />
<Translate>Telegram</Translate>
</Button>
</div>
</div>
<div className={styles.Box}>
<Heading.H5 className={styles.SectionTitle}>
<Translate>We're here to help</Translate>
</Heading.H5>
<p className={styles.SectionContent}>
<Text size='sm' style={{ display: 'inline' }}>
<Translate>Email us at</Translate>{' '}
</Text>
<a href='mailto:api-support@deriv.com' style={{ display: 'inline' }}>
<Text size='sm' style={{ display: 'inline' }}>
<Translate>api-support@deriv.com </Translate>
<Translate>if you need any assistance or support.</Translate>
</Text>
</a>
<Text size='sm' style={{ display: 'inline' }}>
<Translate>if you need any assistance or support.</Translate>
</Text>
</p>
<div className={styles.EmailButton}>
<Button
color='black'
size='md'
variant='secondary'
fullWidth
onClick={() => {
window.open('mailto:api-support@deriv.com', '_blank');
}}
>
<LabelPairedEnvelopeMdBoldIcon /> <Translate>Send an email</Translate>
</Button>
</p>
<div className={styles.EmailButton}>
<Button
color='black'
size='md'
variant='secondary'
fullWidth
onClick={() => {
window.open('mailto:api-support@deriv.com', '_blank');
}}
>
<LabelPairedEnvelopeMdBoldIcon /> <Translate>Send an email</Translate>
</Button>
</div>
</div>
</div>
</div>
</div>
</section>
</section>
</div>
);
};
Expand Down
Loading
Loading