Skip to content

Commit 1307440

Browse files
committed
fix(CPDashboard): update handleDateChange function
1 parent f3798b3 commit 1307440

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

src/components/CommunityPortal/CPDashboard.jsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,6 @@ export function CPDashboard() {
4343
}, []);
4444

4545
const handleDateChange = date => {
46-
setDateError('');
47-
48-
if (!date) {
49-
setSelectedDate('');
50-
return;
51-
}
52-
5346
const today = new Date();
5447
today.setHours(0, 0, 0, 0); // midnight today
5548

@@ -58,7 +51,7 @@ export function CPDashboard() {
5851
setSelectedDate('');
5952
return;
6053
}
61-
54+
setDateError('');
6255
setSelectedDate(date);
6356
};
6457

@@ -120,7 +113,6 @@ export function CPDashboard() {
120113
)}
121114
</div>
122115
</div>
123-
124116
<div className="filter-item">
125117
<label htmlFor="online-only">Online</label>
126118
<div>

0 commit comments

Comments
 (0)