File tree Expand file tree Collapse file tree
src/components/Collaboration Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ function Collaboration() {
1515 const [ totalPages , setTotalPages ] = useState ( 0 ) ;
1616 const [ categories , setCategories ] = useState ( [ ] ) ;
1717 const [ summaries , setSummaries ] = useState ( null ) ;
18- const [ showSearchResults , setShowSearchResults ] = useState ( false ) ;
18+ const [ showSearchResults , setShowSearchResults ] = useState ( true ) ;
1919 const [ showTooltip , setShowTooltip ] = useState ( false ) ;
2020 const [ tooltipPosition , setTooltipPosition ] = useState ( null ) ;
2121
@@ -30,7 +30,7 @@ function Collaboration() {
3030 } , [ ] ) ;
3131
3232 const fetchJobAds = async ( givenQuery , givenCategory ) => {
33- const adsPerPage = 20 ;
33+ const adsPerPage = 18 ;
3434
3535 try {
3636 const response = await fetch (
@@ -140,6 +140,11 @@ function Collaboration() {
140140 fetchCategories ( ) ;
141141 } , [ currentPage ] ) ; // Re-fetch job ads when page or category changes
142142
143+ useEffect ( ( ) => {
144+ fetchJobAds ( '' , '' ) ; // Fetch all jobs initially
145+ fetchCategories ( ) ;
146+ } , [ ] ) ; // Empty dependency array means this runs once on mount
147+
143148 if ( summaries ) {
144149 return (
145150 < div className = { `job-landing ${ darkMode ? 'user-collaboration-dark-mode' : '' } ` } >
You can’t perform that action at this time.
0 commit comments