diff --git a/components/Party/index.tsx b/components/Party/index.tsx index b00c1104..eb5a0695 100644 --- a/components/Party/index.tsx +++ b/components/Party/index.tsx @@ -39,21 +39,21 @@ const Party = (props: Props) => { // Set up states const { party } = useSnapshot(appState) + const jobState = party.job const [job, setJob] = useState() const [currentTab, setCurrentTab] = useState(GridType.Weapon) - // Update job when state changes - subscribeKey(appState.party, 'job', (value: Job) => { - setJob(value) - }) - // Reset state on first load useEffect(() => { const resetState = clonedeep(initialAppState) appState.grid = resetState.grid }, []) + useEffect(() => { + setJob(jobState) + }, [jobState]) + useEffect(() => { jobChanged() }, [job])