Skip to content

Commit

Permalink
Do Icon cleanup and property consolidation with External links too
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgall committed Apr 26, 2024
1 parent ece2b36 commit a13cb0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/components/ui/page/Navigation/NavigationExternalLink.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box, Hide, Text, Flex } from '@chakra-ui/react';
import { ReactElement } from 'react';
import { Icon } from '@phosphor-icons/react';
import { useTranslation } from 'react-i18next';

interface INavigationLink {
Expand All @@ -8,15 +8,15 @@ interface INavigationLink {
href: string;
testId: string;
routeKey?: string;
Icon: ReactElement;
NavigationIcon: Icon;
closeDrawer?: () => void;
}

export function NavigationExternalLink({
tooltipKey,
ariaLabelKey,
testId,
Icon,
NavigationIcon,
routeKey,
closeDrawer,
...rest
Expand All @@ -34,7 +34,7 @@ export function NavigationExternalLink({
rel="noreferrer noopener"
>
<Flex>
<Box w={6}>{Icon}</Box>
<Box w={6}>{<NavigationIcon size={24} />}</Box>
<Box
mx={3}
whiteSpace="nowrap"
Expand Down
6 changes: 3 additions & 3 deletions src/components/ui/page/Navigation/NavigationLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,23 @@ function ExternalLinks({ closeDrawer }: { closeDrawer?: () => void }) {
ariaLabelKey="ariaLabelFAQ"
tooltipKey="faq"
testId="navigationExternal-faq"
Icon={<Question size={24} />}
NavigationIcon={Question}
closeDrawer={closeDrawer}
/>
<NavigationExternalLink
href={URL_DISCORD}
ariaLabelKey="ariaLabelDiscord"
tooltipKey="discord"
testId="navigationExternal-discord"
Icon={<DiscordLogo size={24} />}
NavigationIcon={DiscordLogo}
closeDrawer={closeDrawer}
/>
<NavigationExternalLink
href={URL_DOCS}
ariaLabelKey="ariaLabelDocumentation"
tooltipKey="documentation"
testId="navigationExternal-documentation"
Icon={<BookOpen size={24} />}
NavigationIcon={BookOpen}
closeDrawer={closeDrawer}
/>
</Box>
Expand Down

0 comments on commit a13cb0c

Please sign in to comment.