diff --git a/src/Components/ConfirmEmail/ConfirmEmail.js b/src/Components/ConfirmEmail/ConfirmEmail.js index 161a0623..ac375d98 100644 --- a/src/Components/ConfirmEmail/ConfirmEmail.js +++ b/src/Components/ConfirmEmail/ConfirmEmail.js @@ -1,4 +1,4 @@ -function ConfirmEmail({ request,status }) { +function ConfirmEmail({ request, status }) { return ( <>
Thank You
-Regards
IEDC MEC Collab Team
Thank You
-Regards
IEDC MEC Collab Team
For any queries please visit{" "} - https://iedcmec.in + + https://iedcmec.in +
diff --git a/src/Components/NavigateBar/NavigateBar.jsx b/src/Components/NavigateBar/NavigateBar.jsx index e1d94fa1..40b2fb1e 100644 --- a/src/Components/NavigateBar/NavigateBar.jsx +++ b/src/Components/NavigateBar/NavigateBar.jsx @@ -16,8 +16,6 @@ const Navbar = () => { const [showProjectModal, setShowProjectModal] = useState(false); const { currentUser } = useContext(AuthContext); const { handleSearch, handleSearchDevelopers } = useContext(ProjectContext); - const [query, setQuery] = useState(""); - const [query1, setQuery1] = useState(""); const history = useHistory(); const [open1, setOpen1] = useState(false); const location = useLocation(); @@ -34,16 +32,6 @@ const Navbar = () => { alert("Please Login to Continue."); } }; - useEffect(() => { - const timeOutId = setTimeout(() => handleSearch(query), 500); - return () => clearTimeout(timeOutId); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [query]); - useEffect(() => { - const timeOutId = setTimeout(() => handleSearchDevelopers(query1), 500); - return () => clearTimeout(timeOutId); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [query1]); const [selectedUser, setSelectedUser] = useState(null); const getDev = async (id) => { if (id) { @@ -132,8 +120,10 @@ const Navbar = () => { > setQuery(e.target.value)} + onChange={(e) => { + e.preventDefault(); + handleSearch(e.target.value); + }} style={{ borderStyle: "none", outline: "none", width: "95%" }} > { > setQuery1(e1.target.value)} + onChange={(e1) => { + e1.preventDefault(); + handleSearchDevelopers(e1.target.value); + }} style={{ borderStyle: "none", outline: "none", width: "95%" }} > { > handleSearch(e.target.value)} + onChange={(e) => { + history.push(`/projects`); + handleSearch(e.target.value); + }} style={{ borderStyle: "none", outline: "none", width: "95%" }} > { +const RequirementDetails = (props) => { + const { fetchData } = useContext(ProjectContext); + const { currentUser } = useContext(AuthContext); + const [canModifyProject, setCanModifyProject] = useState(false); + const [showNewProjectModal, setShowNewProjectModal] = useState(false); + const [displayConfirmationModal, setDisplayConfirmationModal] = useState( + false + ); + const history = useHistory(); + const submitDelete = (id) => { + doDeleteProject(id, () => { + toast("Project deleted successfully"); + fetchData(); + }); + setDisplayConfirmationModal(false); + history.go(0); + }; + + const hideConfirmationModal = () => { + setDisplayConfirmationModal(false); + }; + useEffect(() => { + if (currentUser?.uid === props.selectedProject.leader_id) { + setCanModifyProject(true); + } else { + setCanModifyProject(false); + } + }, [currentUser?.uid, props.selectedProject.leader_id]); + function deleteProj() { + setDisplayConfirmationModal(true); + } return ( <>