Skip to content

Commit

Permalink
fix: ez mode checks
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Jan 11, 2024
1 parent e1450f8 commit e2bb1f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/components/layout/dialogs/filters/Advanced.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ export default function AdvancedFilter() {
? s.filters[category]?.standard || STANDARD_BACKUP
: STANDARD_BACKUP,
)
const easyMode = useStorage((s) =>
category === 'pokemon' ? s.filters.pokemon.easyMode : false,
)
const easyMode = useStorage((s) => !!s.filters?.[category]?.easyMode)
const [filters, setFilters] = useDeepStore(
`filters.${category}.filter.${id}`,
standard,
Expand Down
4 changes: 1 addition & 3 deletions src/components/layout/drawer/SelectorItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ const getOtherData = (id) => {
export function StandardItem({ id, category, ...props }) {
const [filter, setFilter] = useDeepStore(`filters.${category}.filter.${id}`)
const hasAll = checkIfHasAll(category, id)
const easyMode = useStorage((s) =>
category === 'pokemon' ? s.filters.pokemon.easyMode : false,
)
const easyMode = useStorage((s) => !!s.filters?.[category]?.easyMode)
return (
<SelectorItem
{...props}
Expand Down

0 comments on commit e2bb1f0

Please sign in to comment.