Fix updating uncap and transcendence
This was broken because when we made anonymous parties editable, we moved to using a `editable` boolean passed down through props and forgot to edit these methods
This commit is contained in:
parent
4271e2fcc8
commit
942abf5a89
5 changed files with 7 additions and 30 deletions
|
|
@ -16,7 +16,6 @@ import type { DetailsObject, JobSkillObject, SearchableObject } from '~types'
|
|||
|
||||
import api from '~utils/api'
|
||||
import { appState } from '~utils/appState'
|
||||
import { accountState } from '~utils/accountState'
|
||||
|
||||
import './index.scss'
|
||||
|
||||
|
|
@ -330,11 +329,7 @@ const CharacterGrid = (props: Props) => {
|
|||
position: number,
|
||||
uncapLevel: number
|
||||
) {
|
||||
if (
|
||||
party.user &&
|
||||
accountState.account.user &&
|
||||
party.user.id === accountState.account.user.id
|
||||
) {
|
||||
if (props.editable) {
|
||||
memoizeUncapAction(id, position, uncapLevel)
|
||||
|
||||
// Optimistically update UI
|
||||
|
|
@ -430,11 +425,7 @@ const CharacterGrid = (props: Props) => {
|
|||
position: number,
|
||||
stage: number
|
||||
) {
|
||||
if (
|
||||
party.user &&
|
||||
accountState.account.user &&
|
||||
party.user.id === accountState.account.user.id
|
||||
) {
|
||||
if (props.editable) {
|
||||
memoizeTranscendenceAction(id, position, stage)
|
||||
|
||||
// Optimistically update UI
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import ExtraSummons from '~components/ExtraSummons'
|
|||
|
||||
import api from '~utils/api'
|
||||
import { appState } from '~utils/appState'
|
||||
import { accountState } from '~utils/accountState'
|
||||
import type { DetailsObject, SearchableObject } from '~types'
|
||||
|
||||
import './index.scss'
|
||||
|
|
@ -184,11 +183,7 @@ const SummonGrid = (props: Props) => {
|
|||
position: number,
|
||||
uncapLevel: number
|
||||
) {
|
||||
if (
|
||||
party.user &&
|
||||
accountState.account.user &&
|
||||
party.user.id === accountState.account.user.id
|
||||
) {
|
||||
if (props.editable) {
|
||||
memoizeUncapAction(id, position, uncapLevel)
|
||||
|
||||
// Optimistically update UI
|
||||
|
|
@ -294,11 +289,7 @@ const SummonGrid = (props: Props) => {
|
|||
position: number,
|
||||
stage: number
|
||||
) {
|
||||
if (
|
||||
party.user &&
|
||||
accountState.account.user &&
|
||||
party.user.id === accountState.account.user.id
|
||||
) {
|
||||
if (props.editable) {
|
||||
memoizeTranscendenceAction(id, position, stage)
|
||||
|
||||
// Optimistically update UI
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.Uncap {
|
||||
.UncapWrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ const UncapIndicator = (props: Props) => {
|
|||
}
|
||||
|
||||
return (
|
||||
<div className="Uncap">
|
||||
<div className="UncapWrapper">
|
||||
<ul className="UncapIndicator">
|
||||
{Array.from(Array(numStars)).map((x, i) => {
|
||||
if (props.type === 'character' && i > 4) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import WeaponConflictModal from '~components/WeaponConflictModal'
|
|||
|
||||
import api from '~utils/api'
|
||||
import { appState } from '~utils/appState'
|
||||
import { accountState } from '~utils/accountState'
|
||||
|
||||
import type { DetailsObject, SearchableObject } from '~types'
|
||||
|
||||
|
|
@ -265,11 +264,7 @@ const WeaponGrid = (props: Props) => {
|
|||
position: number,
|
||||
uncapLevel: number
|
||||
) {
|
||||
if (
|
||||
party.user &&
|
||||
accountState.account.user &&
|
||||
party.user.id === accountState.account.user.id
|
||||
) {
|
||||
if (props.editable) {
|
||||
memoizeAction(id, position, uncapLevel)
|
||||
|
||||
// Optimistically update UI
|
||||
|
|
|
|||
Loading…
Reference in a new issue