Skip to content

Commit

Permalink
feat projectDetails: dynamic project name display on document title
Browse files Browse the repository at this point in the history
  • Loading branch information
NSUWAL123 committed Apr 2, 2024
1 parent 699ce89 commit fc44804
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/frontend/src/views/ProjectDetailsV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ const Home = () => {
const taskModalStatus = CoreModules.useAppSelector((state) => state.project.taskModalStatus);
const projectOpfsBasemapPath = useAppSelector((state) => state?.project?.projectOpfsBasemapPath);

useEffect(() => {
if (state.projectInfo.title) {
document.title = `${state.projectInfo.title} - HOT Field Mapping Tasking Manager`;
} else {
document.title = 'HOT Field Mapping Tasking Manager';
}
}, [state.projectInfo.title]);

//snackbar handle close funtion
const handleClose = (event, reason) => {
if (reason === 'clickaway') {
Expand Down

0 comments on commit fc44804

Please sign in to comment.