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
16 changes: 8 additions & 8 deletions src/components/CommunityPortal/Activities/ActivityList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function ActivityList() {

const filteredActivities = activities.filter(activity => {
return (
(!filter.type || activity.type.toLowerCase().includes(filter.type.toLowerCase())) &&
(!filter.type || activity.type === filter.type) &&
(!filter.date || activity.date === filter.date) &&
(!filter.location || activity.location.toLowerCase().includes(filter.location.toLowerCase()))
);
Expand All @@ -153,13 +153,13 @@ function ActivityList() {
<div className={`${styles.filters} ${darkMode ? styles.darkFilters : ''}`}>
<label>
Type:
<input
type="text"
name="type"
value={filter.type}
onChange={handleFilterChange}
placeholder="Enter type"
/>
<select name="type" value={filter.type} onChange={handleFilterChange}>
<option value="">All</option>
<option value="Fitness">Fitness</option>
<option value="Social">Social</option>
<option value="Educational">Educational</option>
<option value="Art">Art</option>
</select>
</label>

<label>
Expand Down
20 changes: 20 additions & 0 deletions src/components/CommunityPortal/Activities/ActivityList.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,21 @@
box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.filters select {
padding: 10px;
height: 48px;
border: 1px solid #d1d5db;
border-radius: 6px;
margin-top: 5px;
font-size: 1rem;
}

.filters select:focus {
outline: none;
border-color: #3b82f6;
box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.filters button {
margin: 30px 0;
border: 1px solid #000000;
Expand All @@ -77,6 +92,11 @@
border: 1px solid #ffffff;
}

.darkFilters select{
background: #0f172a;
border: 1px solid #ffffff;
}

.activityList {
max-width: 900px;
margin: 0 auto;
Expand Down
Loading