Show transcendence art and stage in summon hovercard

This commit is contained in:
Justin Edmund 2023-02-02 03:19:10 -08:00
parent 2a1b84fa0f
commit 4ae4dce39a

View file

@ -16,6 +16,7 @@ import './index.scss'
interface Props { interface Props {
gridSummon: GridSummon gridSummon: GridSummon
children: React.ReactNode children: React.ReactNode
side?: 'top' | 'right' | 'bottom' | 'left'
onTriggerClick: () => void onTriggerClick: () => void
} }
@ -57,8 +58,14 @@ const SummonHovercard = (props: Props) => {
if ( if (
upgradedSummons.indexOf(summon.granblue_id.toString()) != -1 && upgradedSummons.indexOf(summon.granblue_id.toString()) != -1 &&
props.gridSummon.uncap_level == 5 props.gridSummon.uncap_level == 5
) ) {
suffix = '_02' suffix = '_02'
} else if (
props.gridSummon.object.uncap.xlb &&
props.gridSummon.transcendence_step > 0
) {
suffix = '_03'
}
// Generate the correct source for the summon // Generate the correct source for the summon
imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/summon-grid/${summon.granblue_id}${suffix}.jpg` imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/summon-grid/${summon.granblue_id}${suffix}.jpg`
@ -81,7 +88,7 @@ const SummonHovercard = (props: Props) => {
<HovercardTrigger asChild onClick={props.onTriggerClick}> <HovercardTrigger asChild onClick={props.onTriggerClick}>
{props.children} {props.children}
</HovercardTrigger> </HovercardTrigger>
<HovercardContent className="Summon"> <HovercardContent className="Summon" side={props.side}>
<div className="top"> <div className="top">
<div className="title"> <div className="title">
<h4>{props.gridSummon.object.name[locale]}</h4> <h4>{props.gridSummon.object.name[locale]}</h4>
@ -100,6 +107,8 @@ const SummonHovercard = (props: Props) => {
type="summon" type="summon"
ulb={props.gridSummon.object.uncap.ulb || false} ulb={props.gridSummon.object.uncap.ulb || false}
flb={props.gridSummon.object.uncap.flb || false} flb={props.gridSummon.object.uncap.flb || false}
xlb={props.gridSummon.object.uncap.xlb || false}
transcendenceStage={props.gridSummon.transcendence_step}
special={false} special={false}
/> />
</div> </div>