+
0
+ ? "d-flex justify-content-center px-2"
+ : "d-flex justify-content-center px-2w-100"
+ }`}
+ >
setAddNote(!addNote)}
>
- {addNote ? "Hide Editor" : "Add Note"}
+ {addNote ? "Hide Editor" : "Add a Note"}
)}
diff --git a/src/components/Layout/Header.jsx b/src/components/Layout/Header.jsx
index 7ed724a2..176576a0 100644
--- a/src/components/Layout/Header.jsx
+++ b/src/components/Layout/Header.jsx
@@ -64,7 +64,7 @@ const Header = () => {
navigate(`/employee/${profile?.employeeInfo?.id}?for=attendance`);
};
// const { projects, loading: projectLoading } = useProjects();
- const { projectNames, loading: projectLoading } = useProjectName();
+ const { projectNames, loading: projectLoading } = useProjectName();
const selectedProject = useSelector(
(store) => store.localVariables.projectId
@@ -88,8 +88,11 @@ const Header = () => {
if (projectNames && selectedProject !== " ") {
dispatch(setProjectId(projectNames[0]?.id));
}
- }, [projectNames, ]);
- const isProjectPath = /^\/projectNames\/[a-f0-9-]{36}$/.test(location.pathname);
+ }, [projectNames]);
+
+ /** Check if current page id project details page */
+ const isProjectPath = /^\/projects\/[a-f0-9-]{36}$/.test(location.pathname);
+
return (