Skip to content

Commit 20a262f

Browse files
committed
ui: fix project loading
1 parent c152e72 commit 20a262f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

frontend/src/pages/SubProjects/SubProjectContainer.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ class SubProjectContainer extends Component {
7171
}
7272

7373
componentDidUpdate(prevProps) {
74+
if (this.props.router.location.pathname !== prevProps.router.location.pathname) {
75+
const newProjectId = this.props.router.location.pathname.split("/")[2];
76+
if (newProjectId !== this.projectId) {
77+
this.setState({ isDataFetched: false });
78+
this.projectId = newProjectId;
79+
this.props.setSelectedView(this.projectId, "project");
80+
this.props.fetchAllProjectDetails(this.projectId, true);
81+
this.setState({ isDataFetched: true });
82+
}
83+
}
7484
const searchTermChanges = this.props.searchTerm !== prevProps.searchTerm;
7585
const projectsChange = !_isEqual(this.props.subProjects, prevProps.subProjects);
7686

0 commit comments

Comments
 (0)