Skip to content

Commit

Permalink
Merge pull request #530 from AI4Bharat/CL-612
Browse files Browse the repository at this point in the history
cleared project report when reports page is unmounted
  • Loading branch information
harsh12-99 authored Dec 28, 2023
2 parents e746cfe + 242557e commit ef8cb84
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/containers/Organization/Project/ProjectReport.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
import ViewColumnIcon from "@mui/icons-material/ViewColumn";
import MailIcon from "@mui/icons-material/Mail";
import { ColumnSelector } from "common";
import constants from "redux/constants";

const ProjectReport = () => {
const { projectId } = useParams();
Expand Down Expand Up @@ -69,6 +70,13 @@ const ProjectReport = () => {
dispatch(APITransport(apiObj));
};

useEffect(() => {
return () => {
setTableData([]);
dispatch({ type: constants.GET_PROJECT_REPORTS, payload: [] });
};
}, [dispatch]);

useEffect(() => {
let rawData = [];

Expand Down

0 comments on commit ef8cb84

Please sign in to comment.