Unverified Commit 56237865 authored by Andrey Azov's avatar Andrey Azov Committed by GitHub
Browse files

Fix the unexpected expansion of species links on the home page (#495)

parent a8ac5046
Pipeline #152099 passed with stages
in 4 minutes and 6 seconds
......@@ -56,7 +56,7 @@ type HomepageAppLinksRowProps = {
const HomepageAppLinks = (props: Props) => {
const [expandedRowIndex, setExpandedRowIndex] = useState<number | null>(null);
const onToggleRow = (index: number) => {
const onToggleRow = (index: number | null) => {
if (index === expandedRowIndex) {
setExpandedRowIndex(null);
} else {
......@@ -86,7 +86,7 @@ const HomepageAppLinksRow = (props: HomepageAppLinksRowProps) => {
const dispatch = useDispatch();
const onOutsideClick = () => {
toggleExpand();
isExpanded && toggleExpand();
};
useOutsideClick(elementRef, onOutsideClick);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment