Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

yashim/hotfix: removed extra language switcher & Resources link at partner navbar #1401

Merged
merged 3 commits into from
Feb 4, 2021
Merged
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
43 changes: 1 addition & 42 deletions src/components/layout/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -805,18 +805,6 @@ export const NavPartners = ({ no_login_signup }) => {
}
}, [])

const resources_ref = useRef(null)
const link_resources_ref = useRef(null)
const [is_resources_open, setIsResourcesOpen] = useState(false)
const [has_resources_animation, setHasResourcesAnimation] = useState(false)
const closeResources = () => setIsResourcesOpen(false)
useOutsideClick(resources_ref, closeResources, link_resources_ref)

const handleResourcesClick = () => {
setHasResourcesAnimation(true)
setIsResourcesOpen(!is_resources_open)
}

const [is_canvas_menu_open, openOffCanvasMenu, closeOffCanvasMenu] = moveOffCanvasMenu()
return (
<>
Expand Down Expand Up @@ -849,17 +837,6 @@ export const NavPartners = ({ no_login_signup }) => {
</HomeContainer>
</DerivHomeWrapper>
<StyledNav>
<PlatformsDropdown
forward_ref={resources_ref}
link_ref={link_resources_ref}
is_open={is_resources_open}
has_animation={has_resources_animation}
Content={() => <NavResources onClick={handleResourcesClick} />}
title={localize('Resources')}
description={localize(
'Help yourself to various resources that can help you get the best out of your trading experience.',
)}
/>
<StyledNavWrapper no_login_signup>
<NavLeft>
<NavLogoLink to="/partners/" aria-label={localize('Partners')}>
Expand All @@ -885,17 +862,8 @@ export const NavPartners = ({ no_login_signup }) => {
{localize('Payment agents')}
</StyledLink>
</NavLink>
<NavLink onClick={handleResourcesClick}>
<StyledButton
aria-label={localize('Resources')}
active={is_resources_open}
ref={link_resources_ref}
>
{localize('Resources')}
</StyledButton>
</NavLink>
</StyledNavCenter>
{!no_login_signup ? (
{!no_login_signup && (
<StyledNavRight
move={show_button}
button_ref={button_ref}
Expand Down Expand Up @@ -924,15 +892,6 @@ export const NavPartners = ({ no_login_signup }) => {
<span>{localize('Affiliate & IB sign up')}</span>
</LinkSignupButton>
</StyledNavRight>
) : (
<NavRight
move={show_button}
button_ref={button_ref}
mounted={mounted}
has_scrolled={has_scrolled}
>
<LanguageSwitcher short_name="true" is_high_nav />
</NavRight>
)}

{is_canvas_menu_open ? (
Expand Down