Merge pull request #109 from jedmund/fix-build
Fix various issues - UncapStars, Radix update changes, React key warnings
This commit is contained in:
commit
485a56b131
5 changed files with 28 additions and 10 deletions
|
|
@ -187,7 +187,7 @@ const AwakeningSelect = (props: Props) => {
|
||||||
max={maxValue}
|
max={maxValue}
|
||||||
step="1"
|
step="1"
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
visible={awakeningType !== -1}
|
visible={`${awakeningType !== -1}`}
|
||||||
ref={awakeningLevelInput}
|
ref={awakeningLevelInput}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import type { JobSkillObject, SearchableObject } from '~types'
|
||||||
|
|
||||||
import api from '~utils/api'
|
import api from '~utils/api'
|
||||||
import { appState } from '~utils/appState'
|
import { appState } from '~utils/appState'
|
||||||
|
import { accountState } from '~utils/accountState'
|
||||||
|
|
||||||
import './index.scss'
|
import './index.scss'
|
||||||
|
|
||||||
|
|
@ -283,10 +284,16 @@ const CharacterGrid = (props: Props) => {
|
||||||
position: number,
|
position: number,
|
||||||
uncapLevel: number
|
uncapLevel: number
|
||||||
) {
|
) {
|
||||||
memoizeAction(id, position, uncapLevel)
|
if (
|
||||||
|
party.user &&
|
||||||
|
accountState.account.user &&
|
||||||
|
party.user.id === accountState.account.user.id
|
||||||
|
) {
|
||||||
|
memoizeAction(id, position, uncapLevel)
|
||||||
|
|
||||||
// Optimistically update UI
|
// Optimistically update UI
|
||||||
updateUncapLevel(position, uncapLevel)
|
updateUncapLevel(position, uncapLevel)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const memoizeAction = useCallback(
|
const memoizeAction = useCallback(
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,12 @@ interface Props {
|
||||||
}
|
}
|
||||||
|
|
||||||
const SearchFilterCheckboxItem = (props: Props) => {
|
const SearchFilterCheckboxItem = (props: Props) => {
|
||||||
function handleCheckedChange(checked: boolean) {
|
function handleCheckedChange(checked: string | boolean) {
|
||||||
props.onCheckedChange(checked, props.valueKey)
|
if (typeof checked === 'boolean') {
|
||||||
|
props.onCheckedChange(checked, props.valueKey)
|
||||||
|
} else {
|
||||||
|
props.onCheckedChange(false, props.valueKey)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import ExtraSummons from '~components/ExtraSummons'
|
||||||
|
|
||||||
import api from '~utils/api'
|
import api from '~utils/api'
|
||||||
import { appState } from '~utils/appState'
|
import { appState } from '~utils/appState'
|
||||||
|
import { accountState } from '~utils/accountState'
|
||||||
import type { SearchableObject } from '~types'
|
import type { SearchableObject } from '~types'
|
||||||
|
|
||||||
import './index.scss'
|
import './index.scss'
|
||||||
|
|
@ -156,10 +157,16 @@ const SummonGrid = (props: Props) => {
|
||||||
position: number,
|
position: number,
|
||||||
uncapLevel: number
|
uncapLevel: number
|
||||||
) {
|
) {
|
||||||
memoizeAction(id, position, uncapLevel)
|
if (
|
||||||
|
party.user &&
|
||||||
|
accountState.account.user &&
|
||||||
|
party.user.id === accountState.account.user.id
|
||||||
|
) {
|
||||||
|
memoizeAction(id, position, uncapLevel)
|
||||||
|
|
||||||
// Optimistically update UI
|
// Optimistically update UI
|
||||||
updateUncapLevel(position, uncapLevel)
|
updateUncapLevel(position, uncapLevel)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const memoizeAction = useCallback(
|
const memoizeAction = useCallback(
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ const WeaponSearchFilterBar = (props: Props) => {
|
||||||
|
|
||||||
const renderWeaponSeriesGroup = (index: number) => {
|
const renderWeaponSeriesGroup = (index: number) => {
|
||||||
return (
|
return (
|
||||||
<DropdownMenu.Group className="Group">
|
<DropdownMenu.Group className="Group" key={`Group-${index}`}>
|
||||||
{weaponSeries
|
{weaponSeries
|
||||||
.slice(
|
.slice(
|
||||||
index * Math.ceil(weaponSeries.length / 3),
|
index * Math.ceil(weaponSeries.length / 3),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue