Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 27 additions & 17 deletions src/components/Collaboration/Collaboration.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -333,23 +333,33 @@ function Collaboration() {

{/* JOB GRID */}
<div className={styles.jobList}>
{jobAds.map(ad => (
<button
key={ad._id}
type="button"
className={styles.jobAd}
onClick={() => setSelectedJob(ad)}
>
<img
src={
ad.imageUrl ||
`/api/placeholder/640/480?text=${encodeURIComponent(ad.category || 'Job')}`
}
alt={ad.title}
/>
<h3>{ad.title}</h3>
</button>
))}
{jobAds.length > 0 ? (
jobAds.map(ad => (
<button
key={ad._id}
type="button"
className={styles.jobAd}
onClick={() => setSelectedJob(ad)}
>
<img
src={
ad.imageUrl ||
`/api/placeholder/640/480?text=${encodeURIComponent(ad.category || 'Job')}`
}
alt={ad.title}
/>
<h3>{ad.title}</h3>
</button>
))
) : (
<div className={styles.emptyState}>
<p>No job listings found matching your criteria.</p>
<p>Try clearing filters or adjusting your search terms.</p>
<button className="btn btn-secondary" onClick={handleClearAllFilters}>
Clear All Filters
</button>
</div>
)}
</div>

{/* PAGINATION */}
Expand Down
27 changes: 27 additions & 0 deletions src/components/Collaboration/Collaboration.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,33 @@
gap: 8px;
}

.emptyState {
grid-column: 1 / -1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 3rem;
text-align: center;
color: #666;
min-height: 250px;
border-radius: 12px;
background: transparent;
}

.emptyState.dark {
color: #ccc; /* Dark mode text color */
}

.emptyState p {
margin: 0.5rem 0;
font-size: 1rem;
}

.emptyState button {
margin-top: 1rem;
}

/* Buttons FIRST to avoid specificity issues */
.dropdownWrapper button {
padding: 8px 12px;
Expand Down
Loading