diff --git a/components/UncapIndicator/index.tsx b/components/UncapIndicator/index.tsx index 296e85da..b8ab47ec 100644 --- a/components/UncapIndicator/index.tsx +++ b/components/UncapIndicator/index.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react' +import React from 'react' import UncapStar from '~components/UncapStar' import './index.scss' diff --git a/components/UncapStar/index.tsx b/components/UncapStar/index.tsx index 78510fad..9b0969f7 100644 --- a/components/UncapStar/index.tsx +++ b/components/UncapStar/index.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react' +import React from 'react' import classnames from 'classnames' import './index.scss' diff --git a/components/WeaponGrid/index.tsx b/components/WeaponGrid/index.tsx index d5e337f7..83d8aad0 100644 --- a/components/WeaponGrid/index.tsx +++ b/components/WeaponGrid/index.tsx @@ -18,6 +18,7 @@ import type { SearchableObject } from '~types' import './index.scss' import WeaponConflictModal from '~components/WeaponConflictModal' import Alert from '~components/Alert' +import { accountState } from '~utils/accountState' // Props interface Props { @@ -230,10 +231,16 @@ const WeaponGrid = (props: Props) => { position: 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 - updateUncapLevel(position, uncapLevel) + // Optimistically update UI + updateUncapLevel(position, uncapLevel) + } } const memoizeAction = useCallback(