import React from 'react' import * as HoverCard from '@radix-ui/react-hover-card' import WeaponLabelIcon from '~components/WeaponLabelIcon' import UncapIndicator from '~components/UncapIndicator' import { axData } from '~utils/axData' import './index.scss' interface Props { gridSummon: GridSummon children: React.ReactNode } interface KeyNames { [key: string]: { en: string, jp: string } } const SummonHovercard = (props: Props) => { const Element = ['null', 'wind', 'fire', 'water', 'earth', 'dark', 'light'] const Proficiency = ['none', 'sword', 'dagger', 'axe', 'spear', 'bow', 'staff', 'fist', 'harp', 'gun', 'katana'] const tintElement = Element[props.gridSummon.object.element] const wikiUrl = `https://gbf.wiki/${props.gridSummon.object.name.en.replaceAll(' ', '_')}` function summonImage() { let imgSrc = "" if (props.gridSummon) { const summon = props.gridSummon.object const upgradedSummons = [ '2040094000', '2040100000', '2040080000', '2040098000', '2040090000', '2040084000', '2040003000', '2040056000' ] let suffix = '' if (upgradedSummons.indexOf(summon.granblue_id.toString()) != -1 && props.gridSummon.uncap_level == 5) suffix = '_02' // Generate the correct source for the summon imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/summon-grid/${summon.granblue_id}${suffix}.jpg` } return imgSrc } return ( { props.children }

{ props.gridSummon.object.name.en }

{props.gridSummon.object.name.en}
View more on gbf.wiki
) } export default SummonHovercard