Fix build errors

This commit is contained in:
Justin Edmund 2023-01-22 23:30:11 -08:00
parent bdb42bdba4
commit a3cb1ff7b6
9 changed files with 20 additions and 8 deletions

View file

@ -17,7 +17,7 @@ interface Props
onOpenAutoFocus: (event: Event) => void
}
const DialogContent = React.forwardRef<HTMLDivElement, Props>(function dialog(
const DialogContent = React.forwardRef<HTMLDivElement, Props>(function Dialog(
{ children, ...props },
forwardedRef
) {

View file

@ -12,6 +12,7 @@ interface Props {
editable: boolean
found?: boolean
offset: number
removeWeapon: (id: string) => void
updateObject: (object: SearchableObject, position: number) => void
updateUncap: (id: string, position: number, uncap: number) => void
}
@ -32,6 +33,7 @@ const ExtraWeapons = (props: Props) => {
position={props.offset + i}
unitType={1}
gridWeapon={props.grid[props.offset + i]}
removeWeapon={props.removeWeapon}
updateObject={props.updateObject}
updateUncap={props.updateUncap}
/>

View file

@ -15,7 +15,10 @@ export const PopoverAnchor = PopoverPrimitive.Anchor
export const PopoverTrigger = PopoverPrimitive.Trigger
export const PopoverContent = React.forwardRef<HTMLDivElement, Props>(
({ children, ...props }: PropsWithChildren<Props>, forwardedRef) => {
function Popover(
{ children, ...props }: PropsWithChildren<Props>,
forwardedRef
) {
const classes = classnames(props.className, {
Popover: true,
})

View file

@ -2,7 +2,11 @@ import React, { PropsWithChildren, useEffect, useState } from 'react'
import { useTranslation } from 'next-i18next'
import classNames from 'classnames'
import { Popover, PopoverAnchor, PopoverContent } from '~components/Popover'
import {
Popover,
PopoverAnchor,
PopoverContent,
} from '~components/PopoverContent'
import TranscendenceStar from '~components/TranscendenceStar'
import './index.scss'

View file

@ -9,7 +9,7 @@ interface Props {
type: 'character' | 'weapon' | 'summon'
rarity?: number
uncapLevel?: number
position: number
position?: number
transcendenceStage?: number
editable: boolean
flb: boolean
@ -78,7 +78,7 @@ const UncapIndicator = (props: Props) => {
}
const transcendence = (i: number) => {
const tabIndex = props.position * 7 + i + 1
const tabIndex = props.position ? props.position * 7 + i + 1 : 0
return props.type === 'character' || props.type === 'summon' ? (
<TranscendencePopover
open={popoverOpen}
@ -116,7 +116,7 @@ const UncapIndicator = (props: Props) => {
key={`star_${i}`}
index={i}
onStarClick={toggleStar}
tabIndex={props.position * 7 + i + 1}
tabIndex={props.position ? props.position * 7 + i + 1 : 0}
/>
)
}
@ -130,7 +130,7 @@ const UncapIndicator = (props: Props) => {
key={`star_${i}`}
index={i}
onStarClick={toggleStar}
tabIndex={props.position * 7 + i + 1}
tabIndex={props.position ? props.position * 7 + i + 1 : 0}
/>
)
}
@ -143,7 +143,7 @@ const UncapIndicator = (props: Props) => {
key={`star_${i}`}
index={i}
onStarClick={toggleStar}
tabIndex={props.position * 7 + i + 1}
tabIndex={props.position ? props.position * 7 + i + 1 : 0}
/>
)
}

View file

@ -334,6 +334,7 @@ const WeaponGrid = (props: Props) => {
grid={appState.grid.weapons.allWeapons}
editable={party.editable}
offset={numWeapons}
removeWeapon={removeWeapon}
updateObject={receiveWeaponFromSearch}
updateUncap={initiateUncapUpdate}
/>

View file

@ -646,6 +646,7 @@ const ax: ItemSkill[][] = [
minValue: 1,
maxValue: 2,
suffix: '%',
fractional: false,
},
{
name: {

View file

@ -4,6 +4,7 @@ import { GroupedWeaponKeys } from './groupWeaponKeys'
const emptyJob: Job = {
id: '-1',
granblue_id: '-1',
row: '',
ml: false,
order: 0,