Skip to content

Commit

Permalink
fix: quest conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Jan 28, 2024
1 parent ce9eb43 commit 92af316
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/hooks/useRefresh.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ export default function useRefresh() {

useEffect(() => {
if (data?.available) {
const { masterfile, filters, icons, audio } = data.available
const { masterfile, filters, icons, audio, questConditions } =
data.available
const { icons: userIcons, audio: userAudio } = useStorage.getState()
const existing = useMemory.getState()

Expand Down Expand Up @@ -73,12 +74,16 @@ export default function useRefresh() {
JSON.stringify(masterfile.questRewardTypes),
)
}
useMemory.setState({
useMemory.setState((prev) => ({
masterfile,
filters,
Icons,
Audio,
})
available: {
...prev.available,
questConditions,
},
}))
useStorage.setState((prev) => ({
filters: deepMerge({}, filters, prev.filters),
}))
Expand Down

0 comments on commit 92af316

Please sign in to comment.