diff --git a/src/components/client/TreasuryPage.tsx b/src/components/client/TreasuryPage.tsx index a22263d2..954e8b1d 100644 --- a/src/components/client/TreasuryPage.tsx +++ b/src/components/client/TreasuryPage.tsx @@ -58,7 +58,7 @@ const TreasuryPage: NextPage = () => { href="https://etherscan.io/address/0x56398b89d53e8731bca8c1b06886cfb14bd6b654" isExternal > - IQ.eth + IQ.eth{' '} {t('treasury')} diff --git a/src/components/dashboard/sidebar-item.tsx b/src/components/dashboard/sidebar-item.tsx index 8cebcb35..0daf9963 100644 --- a/src/components/dashboard/sidebar-item.tsx +++ b/src/components/dashboard/sidebar-item.tsx @@ -4,6 +4,7 @@ import { Flex, FlexProps, Icon, LinkBox, Image } from '@chakra-ui/react' import { dataAttr } from '@chakra-ui/utils' import { usePathname } from 'next/navigation' import React from 'react' +import Link from 'next/link' import LinkOverlay from '../elements/LinkElements/LinkOverlay' import { useTranslations } from 'next-intl' @@ -20,46 +21,57 @@ export const SidebarItem = (props: SidebarItemProps) => { const pathname = usePathname() const isActiveRoute = pathname?.endsWith(item.route) + const isExternalLink = item.route.startsWith('http') + + const renderLinkContent = () => ( + + {typeof item.icon === 'string' ? ( + icon + ) : ( + + )} + {t(item.label)} + {isActiveRoute && ( + + )} + + ) return ( - - - {typeof item.icon === 'string' ? ( - icon - ) : ( - - )} - {t(item.label)} - - - + {renderLinkContent()} + + ) : ( + + {renderLinkContent()} + + )} ) }