Compare commits

..

No commits in common. "d542c26a176f491a60cb7fad474e432975d9ffce" and "6fe6d0ea402be42c01423ca45aa71e17a932090d" have entirely different histories.

View File

@ -13,7 +13,8 @@ import { useSelector } from "react-redux";
import moment from "moment"; import moment from "moment";
import { useExpenseFilter } from "../../hooks/useExpense"; import { useExpenseFilter } from "../../hooks/useExpense";
import { ExpenseFilterSkeleton } from "./ExpenseSkeleton"; import { ExpenseFilterSkeleton } from "./ExpenseSkeleton";
import { useLocation } from "react-router-dom";
const ExpenseFilterPanel = ({ onApply, handleGroupBy }) => { const ExpenseFilterPanel = ({ onApply, handleGroupBy }) => {
const selectedProjectId = useSelector((store) => store.localVariables.projectId); const selectedProjectId = useSelector((store) => store.localVariables.projectId);
@ -71,12 +72,6 @@ const ExpenseFilterPanel = ({ onApply, handleGroupBy }) => {
closePanel(); closePanel();
}; };
// Close popup when navigating to another component
const location = useLocation();
useEffect(() => {
closePanel();
}, [location]);
if (isLoading || isFetching) return <ExpenseFilterSkeleton />; if (isLoading || isFetching) return <ExpenseFilterSkeleton />;
if(isError && isFetched) return <div>Something went wrong Here- {error.message} </div> if(isError && isFetched) return <div>Something went wrong Here- {error.message} </div>
return ( return (