Filter safes loaded from URL in safe list

This commit is contained in:
Mati Dastugue 2021-03-29 09:56:18 -03:00
parent f38fc95258
commit a72d23681e
1 changed files with 1 additions and 2 deletions

View File

@ -39,7 +39,7 @@ type Props = {
export const SafeListSidebar = ({ children }: Props): ReactElement => { export const SafeListSidebar = ({ children }: Props): ReactElement => {
const [isOpen, setIsOpen] = useState(false) const [isOpen, setIsOpen] = useState(false)
const [filter, setFilter] = useState('') const [filter, setFilter] = useState('')
const safes = useSelector(sortedSafeListSelector) const safes = useSelector(sortedSafeListSelector).filter((safe) => safe.name !== 'LOADED SAFE')
const defaultSafe = useSelector(defaultSafeSelector) const defaultSafe = useSelector(defaultSafeSelector)
const currentSafe = useSelector(safeParamAddressFromStateSelector) const currentSafe = useSelector(safeParamAddressFromStateSelector)
@ -75,7 +75,6 @@ export const SafeListSidebar = ({ children }: Props): ReactElement => {
} }
const filteredSafes = useMemo(() => filterBy(filter, safes), [safes, filter]) const filteredSafes = useMemo(() => filterBy(filter, safes), [safes, filter])
useEffect(() => { useEffect(() => {
setTimeout(() => { setTimeout(() => {
setFilter('') setFilter('')