fix: remove unwanted states fetching logic to avoid multiple API calls. (#6158)

This commit is contained in:
Prateek Shourya
2024-12-05 15:26:35 +05:30
committed by GitHub
parent aa1e192a50
commit d55ee6d5b8

View File

@@ -1,6 +1,6 @@
"use client";
import { ReactNode, useEffect, useRef, useState } from "react";
import { ReactNode, useRef, useState } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";
import { usePopper } from "react-popper";
@@ -125,11 +125,6 @@ export const StateDropdown: React.FC<Props> = observer((props) => {
setQuery,
});
useEffect(() => {
if (projectId) onOpen();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [projectId]);
const dropdownOnChange = (val: string) => {
onChange(val);
handleClose();