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