mirror of
https://github.com/acid-info/logos-ordinals-dashboard.git
synced 2025-02-05 01:53:49 +00:00
fix: fix misc. bugs
This commit is contained in:
parent
e6936593a6
commit
be664bedaf
@ -30,11 +30,14 @@ const Dropdown: React.FC<DropdownProps> = ({
|
||||
const dropdownRef = useRef<HTMLDivElement>(null)
|
||||
|
||||
const state = useHookstate(globalState)
|
||||
|
||||
const defualtState = state.get()
|
||||
|
||||
useEffect(() => {
|
||||
if (defualtState[filterType]?.length === selectedOptions?.length) {
|
||||
setUpdated(false)
|
||||
} else {
|
||||
setUpdated(true)
|
||||
}
|
||||
}, [defualtState, selectedOptions])
|
||||
|
||||
|
@ -12,6 +12,10 @@ const Button = styled.button`
|
||||
border: 1px solid rgb(var(--lsd-border-primary));
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
|
||||
@media (min-width: ${breakpoints.sm}px) {
|
||||
display: none;
|
||||
}
|
||||
`
|
||||
|
||||
const HamburguerMenuContainer = styled.div`
|
||||
|
@ -3,7 +3,7 @@ import { OperatorGrid } from '@/components/Explore/OperatorGrid'
|
||||
import { defaultFilterState } from '@/states/filterState'
|
||||
import styled from '@emotion/styled'
|
||||
import { hookstate, useHookstate } from '@hookstate/core'
|
||||
import React, { useMemo } from 'react'
|
||||
import React, { useCallback, useMemo } from 'react'
|
||||
import useGetOperators from '../../../apis/operators/useGetOperators'
|
||||
import {
|
||||
ARCHETYPE,
|
||||
@ -53,9 +53,9 @@ const ExploreSection: React.FC<ExploreSectionProps> = () => {
|
||||
state[filterType].set(selectedOptions)
|
||||
}
|
||||
|
||||
const handleResetAll = () => {
|
||||
state.set(defaultFilterState)
|
||||
}
|
||||
const handleResetAll = useCallback(() => {
|
||||
state.set(JSON.parse(JSON.stringify(defaultFilterState)))
|
||||
}, [filter])
|
||||
|
||||
return (
|
||||
<Container>
|
||||
|
Loading…
x
Reference in New Issue
Block a user