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