diff --git a/components/JobSection/index.tsx b/components/JobSection/index.tsx index e0c68a4d..f88a4016 100644 --- a/components/JobSection/index.tsx +++ b/components/JobSection/index.tsx @@ -10,7 +10,6 @@ import SearchModal from '~components/SearchModal' import api from '~utils/api' import { appState } from '~utils/appState' -import { ACCESSORY_JOB_IDS } from '~utils/jobsWithAccessories' import type { JobSkillObject, SearchableObject } from '~types' import './index.scss' diff --git a/pages/new/index.tsx b/pages/new/index.tsx index a25d3f8f..e03a3cfa 100644 --- a/pages/new/index.tsx +++ b/pages/new/index.tsx @@ -65,14 +65,19 @@ const NewRoute: React.FC = ({ appState.weaponKeys = context.weaponKeys } appState.version = version - }, []) + }, [context, version]) useEffect(() => { // Clean state const resetState = clonedeep(initialAppState) - Object.keys(resetState).forEach((key) => { - appState[key] = resetState[key] - }) + appState.party = resetState.party + appState.grid = resetState.grid + + // Old method kept in case we need it later + // Object.keys(resetState).forEach((key) => { + // appState[key] = resetState[key] + // }) + // Set party to be editable appState.party.editable = true }, [])