diff --git a/components/DialogContent/index.tsx b/components/DialogContent/index.tsx index cc8a9b5e..455cb7a3 100644 --- a/components/DialogContent/index.tsx +++ b/components/DialogContent/index.tsx @@ -17,7 +17,7 @@ interface Props onOpenAutoFocus: (event: Event) => void } -const DialogContent = React.forwardRef(function dialog( +const DialogContent = React.forwardRef(function Dialog( { children, ...props }, forwardedRef ) { diff --git a/components/ExtraWeapons/index.tsx b/components/ExtraWeapons/index.tsx index 6a4c045f..f3345ccc 100644 --- a/components/ExtraWeapons/index.tsx +++ b/components/ExtraWeapons/index.tsx @@ -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} /> diff --git a/components/Popover/index.scss b/components/PopoverContent/index.scss similarity index 100% rename from components/Popover/index.scss rename to components/PopoverContent/index.scss diff --git a/components/Popover/index.tsx b/components/PopoverContent/index.tsx similarity index 90% rename from components/Popover/index.tsx rename to components/PopoverContent/index.tsx index b38e4985..f8817e48 100644 --- a/components/Popover/index.tsx +++ b/components/PopoverContent/index.tsx @@ -15,7 +15,10 @@ export const PopoverAnchor = PopoverPrimitive.Anchor export const PopoverTrigger = PopoverPrimitive.Trigger export const PopoverContent = React.forwardRef( - ({ children, ...props }: PropsWithChildren, forwardedRef) => { + function Popover( + { children, ...props }: PropsWithChildren, + forwardedRef + ) { const classes = classnames(props.className, { Popover: true, }) diff --git a/components/TranscendencePopover/index.tsx b/components/TranscendencePopover/index.tsx index 4284db55..ed1f41ad 100644 --- a/components/TranscendencePopover/index.tsx +++ b/components/TranscendencePopover/index.tsx @@ -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' diff --git a/components/UncapIndicator/index.tsx b/components/UncapIndicator/index.tsx index 647a0a7d..821769cf 100644 --- a/components/UncapIndicator/index.tsx +++ b/components/UncapIndicator/index.tsx @@ -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' ? ( { 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} /> ) } diff --git a/components/WeaponGrid/index.tsx b/components/WeaponGrid/index.tsx index 8ffc549f..b32b442e 100644 --- a/components/WeaponGrid/index.tsx +++ b/components/WeaponGrid/index.tsx @@ -334,6 +334,7 @@ const WeaponGrid = (props: Props) => { grid={appState.grid.weapons.allWeapons} editable={party.editable} offset={numWeapons} + removeWeapon={removeWeapon} updateObject={receiveWeaponFromSearch} updateUncap={initiateUncapUpdate} /> diff --git a/data/ax.tsx b/data/ax.tsx index bb95aede..15e10ea2 100644 --- a/data/ax.tsx +++ b/data/ax.tsx @@ -646,6 +646,7 @@ const ax: ItemSkill[][] = [ minValue: 1, maxValue: 2, suffix: '%', + fractional: false, }, { name: { diff --git a/utils/appState.tsx b/utils/appState.tsx index 606e5b4e..8dbc9c69 100644 --- a/utils/appState.tsx +++ b/utils/appState.tsx @@ -4,6 +4,7 @@ import { GroupedWeaponKeys } from './groupWeaponKeys' const emptyJob: Job = { id: '-1', + granblue_id: '-1', row: '', ml: false, order: 0,