diff --git a/components/CharacterHovercard/index.tsx b/components/CharacterHovercard/index.tsx index 8a2989d5..b4fbfd77 100644 --- a/components/CharacterHovercard/index.tsx +++ b/components/CharacterHovercard/index.tsx @@ -1,12 +1,14 @@ import React from 'react' import { useRouter } from 'next/router' import { useTranslation } from 'next-i18next' +import jconv from 'jconv' import { Hovercard, HovercardContent, HovercardTrigger, } from '~components/Hovercard' +import Button from '~components/Button' import WeaponLabelIcon from '~components/WeaponLabelIcon' import UncapIndicator from '~components/UncapIndicator' @@ -15,10 +17,10 @@ import { aetherialMastery, permanentMastery, } from '~data/overMastery' +import { characterAwakening } from '~data/awakening' import { ExtendedMastery } from '~types' import './index.scss' -import { characterAwakening } from '~data/awakening' interface Props { gridCharacter: GridCharacter @@ -55,10 +57,13 @@ const CharacterHovercard = (props: Props) => { ] const tintElement = Element[props.gridCharacter.object.element] - const wikiUrl = `https://gbf.wiki/${props.gridCharacter.object.name.en.replaceAll( - ' ', - '_' - )}` + + function goTo() { + const urlSafeName = props.gridCharacter.object.name.en.replaceAll(' ', '_') + const url = `https://gbf.wiki/${urlSafeName}` + + window.open(url, '_blank') + } function characterImage() { let imgSrc = '' @@ -85,7 +90,7 @@ const CharacterHovercard = (props: Props) => { if (canonicalMastery) { return ( -
  • +
  • {canonicalMastery.name[locale]} { } } + const wikiButton = ( +