diff --git a/src/Components/ViewOpportunity/CommonComponents.js b/src/Components/ViewOpportunity/CommonComponents.js index 2d93970..361cf33 100644 --- a/src/Components/ViewOpportunity/CommonComponents.js +++ b/src/Components/ViewOpportunity/CommonComponents.js @@ -27,11 +27,11 @@ const mapUrlToName = { export default function CommonComponents({ onSearchFinal }) { const handleSearchString = (value) => { - onSearchFinal(value) - } + onSearchFinal(value); + }; return ( <> - + @@ -39,38 +39,6 @@ export default function CommonComponents({ onSearchFinal }) { - - - - - - {' '} Full Time Jobs{' '} - - - {' '} Hackathons{' '} - - - {' '} Scholarships{' '} - - - {' '} Coding Competitions{' '} - - - {' '} Tech Conferences{' '} - - - {' '} Internship Opportunities{' '} - - - - - - - ); } diff --git a/src/Components/ViewOpportunity/index.js b/src/Components/ViewOpportunity/index.js index 125e68a..eaef852 100644 --- a/src/Components/ViewOpportunity/index.js +++ b/src/Components/ViewOpportunity/index.js @@ -8,6 +8,7 @@ import { Jumbotron, Row, NavDropdown, + ToggleButton, } from 'react-bootstrap'; import styles from '../../CSS/Opportunity.module.css'; import Navbar from './Navbar'; @@ -43,6 +44,7 @@ export function ViewOpportunity(props) { const [imgSrc, setImgSrc] = useState(); const [filteredData, setFilteredData] = useState(data); const [searchString, setSearchString] = useState(''); + const [onlyForWomen, setOnlyForWomen] = useState(false); React.useEffect(() => { if (searchString?.length > 0) { @@ -98,6 +100,67 @@ export function ViewOpportunity(props) { return ( <> + + + + + + + {' '} + Full Time Jobs{' '} + + + {' '} + Hackathons{' '} + + + {' '} + Scholarships{' '} + + + {' '} + Coding Competitions{' '} + + + {' '} + Tech Conferences{' '} + + + {' '} + Internship Opportunities{' '} + + + + + setOnlyForWomen(e.currentTarget.checked)} + > + Only For Women + + + + + + + {/*
+ setOnlyForWomen(e.target.checked)} + /> + +
*/} {data_length === 0 ? ( @@ -110,6 +173,7 @@ export function ViewOpportunity(props) { {filteredData?.map((item) => { + if (onlyForWomen && !item.onlyForFemale) return; return ; })}