band-aid fixes for the pull request and hopefully a strange ongoing issue

dependabot/npm_and_yarn/react-scripts-4.0.3
Rawrington 5 years ago
parent 7895003b44
commit 8a75b46f51
  1. 2
      package.json
  2. 10
      src/Action.js
  3. 8
      src/App.js

@ -1,6 +1,6 @@
{
"name": "skilldisplay",
"version": "0.1.1",
"version": "0.2.0",
"private": true,
"dependencies": {
"react": "^16.8.6",

@ -45,21 +45,13 @@ export default function Action({ action_id }) {
}
}, [action_id])
const isGCD = React.useMemo(
() =>
gcdOverrides.has(action_id) ||
!ogcdOverrides.has(action_id) ||
apiData !== undefined && apiData.ActionCategory.ID !== 4,
[action_id]
)
if (apiData === undefined || !apiData.Icon) {
return null
}
return (
<img
className={isGCD ? 'action-icon gcd' : 'action-icon ogcd'}
className={(gcdOverrides.has(action_id) || (!ogcdOverrides.has(action_id) && apiData.ActionCategory.ID !== 4)) ? 'action-icon gcd' : 'action-icon ogcd'}
src={`https://xivapi.com/${apiData.Icon}`}
alt={apiData.Name || ''}
/>

@ -8,7 +8,8 @@ class App extends React.Component {
me: 0,
actionlist: [],
actionindex: 1,
lastAddedTimestamp: ''
lastAddedTimestamp: '',
lastAddedAction: -1,
}
constructor(props) {
@ -35,16 +36,17 @@ class App extends React.Component {
if(action <= 8) return //things we don't care about i.e. sprint auto-attacks
if(this.state.lastAddedTimestamp === log[1]) return //no double aoe stuff
if(this.state.lastAddedTimestamp === log[1] && this.state.lastAddedAction === action) return //no double aoe stuff
const index = this.state.actionindex
this.setState((state) => {
const actionindex = (state.actionindex >= 32)?1:state.actionindex+1
const lastAddedTimestamp = log[1]
const lastAddedAction = action
const actionlist = state.actionlist.concat({index,action});
return {actionindex,lastAddedTimestamp,actionlist}
return {actionindex,lastAddedTimestamp,lastAddedAction,actionlist}
})
setTimeout(this.purgeAction.bind(this), 10000)

Loading…
Cancel
Save