fix: Update Links to Links from Menu Items

This commit is contained in:
blessedcoolant 2023-07-26 21:18:59 +12:00 committed by psychedelicious
parent c7d24081e2
commit a00d1e87e4

View File

@ -1,11 +1,11 @@
import { Flex, MenuGroup, Spacer } from '@chakra-ui/react'; import { Flex, Link, MenuGroup, Spacer } from '@chakra-ui/react';
import { memo } from 'react'; import { memo } from 'react';
import StatusIndicator from './StatusIndicator'; import StatusIndicator from './StatusIndicator';
import { Menu, MenuButton, MenuItem, MenuList } from '@chakra-ui/react'; import { Menu, MenuButton, MenuItem, MenuList } from '@chakra-ui/react';
import IAIIconButton from 'common/components/IAIIconButton'; import IAIIconButton from 'common/components/IAIIconButton';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { FaBars, FaBug, FaDiscord, FaGithub, FaKeyboard } from 'react-icons/fa'; import { FaBars, FaBug, FaDiscord, FaKeyboard } from 'react-icons/fa';
import { MdSettings } from 'react-icons/md'; import { MdSettings } from 'react-icons/md';
import { useFeatureStatus } from '../hooks/useFeatureStatus'; import { useFeatureStatus } from '../hooks/useFeatureStatus';
import HotkeysModal from './HotkeysModal/HotkeysModal'; import HotkeysModal from './HotkeysModal/HotkeysModal';
@ -44,41 +44,35 @@ const SiteHeader = () => {
<MenuList> <MenuList>
<MenuGroup title={t('common.communityLabel')}> <MenuGroup title={t('common.communityLabel')}>
{isGithubLinkEnabled && ( {isGithubLinkEnabled && (
<MenuItem <Link href={githubLink} target="_blank">
as="a" <MenuItem icon={<FaDiscord />}>
href={githubLink} {t('common.githubLabel')}
icon={<FaGithub fontSize={20} />} </MenuItem>
> </Link>
{t('common.githubLabel')}
</MenuItem>
)} )}
{isBugLinkEnabled && ( {isBugLinkEnabled && (
<MenuItem <Link href={`${githubLink}/issues}`} target="_blank">
as="a" <MenuItem icon={<FaBug />}>
href={`${githubLink}/issues}`} {t('common.reportBugLabel')}
icon={<FaBug fontSize={20} />} </MenuItem>
> </Link>
{t('common.reportBugLabel')}
</MenuItem>
)} )}
{isDiscordLinkEnabled && ( {isDiscordLinkEnabled && (
<MenuItem <Link href={discordLink} target="_blank">
as="a" <MenuItem icon={<FaDiscord />}>
href={discordLink} {t('common.discordLabel')}
icon={<FaDiscord fontSize={20} />} </MenuItem>
> </Link>
{t('common.discordLabel')}
</MenuItem>
)} )}
</MenuGroup> </MenuGroup>
<MenuGroup title={t('common.settingsLabel')}> <MenuGroup title={t('common.settingsLabel')}>
<HotkeysModal> <HotkeysModal>
<MenuItem as="button" icon={<FaKeyboard fontSize={20} />}> <MenuItem as="button" icon={<FaKeyboard />}>
{t('common.hotkeysLabel')} {t('common.hotkeysLabel')}
</MenuItem> </MenuItem>
</HotkeysModal> </HotkeysModal>
<SettingsModal> <SettingsModal>
<MenuItem as="button" icon={<MdSettings fontSize={20} />}> <MenuItem as="button" icon={<MdSettings />}>
{t('common.settingsLabel')} {t('common.settingsLabel')}
</MenuItem> </MenuItem>
</SettingsModal> </SettingsModal>