Commit c9400468 authored by Max Alekseenko's avatar Max Alekseenko

remove unnecessary prop

parent ee3c848e
......@@ -21,7 +21,6 @@ const NavLink = ({ item, isCollapsed, onClick }: Props) => {
item={ item }
nextRoute={ 'nextRoute' in item ? item.nextRoute : undefined }
onClick={ onClick }
target={ isInternalLink ? '_self' : '_blank' }
href={ isInternalLink ? route(item.nextRoute) : item.url }
isActive={ isInternalLink && item.isActive }
isExternal={ !isInternalLink }
......
......@@ -19,14 +19,13 @@ type Props = {
isCollapsed?: boolean;
onClick?: () => void;
as?: 'a' | 'button';
target?: '_self' | '_blank';
href?: string;
isExternal?: boolean;
isActive?: boolean;
isDisabled?: boolean;
}
const NavLinkBase = ({ item, nextRoute, isCollapsed, onClick, isExternal, as = 'a', target = '_self', href, isActive, isDisabled }: Props) => {
const NavLinkBase = ({ item, nextRoute, isCollapsed, onClick, isExternal, as = 'a', href, isActive, isDisabled }: Props) => {
const isMobile = useIsMobile();
const colors = useColors();
......@@ -41,7 +40,7 @@ const NavLinkBase = ({ item, nextRoute, isCollapsed, onClick, isExternal, as = '
<Link
as={ as }
href={ href }
target={ target }
target={ isExternal ? '_blank' : '_self' }
{ ...styleProps.itemProps }
w={{ base: '100%', lg: isExpanded ? '100%' : '60px', xl: isCollapsed ? '60px' : '100%' }}
display="flex"
......
......@@ -45,7 +45,6 @@ const RewardsNavLink = ({ isCollapsed, onClick }: Props) => {
nextRoute={ isLogedIn ? nextRoute : undefined }
onClick={ handleClick }
as={ isLogedIn ? 'a' : 'button' }
target="_self"
href={ isLogedIn ? route(nextRoute) : undefined }
isActive={ router.pathname === pathname }
isDisabled={ !isInitialized }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment