From 91eb94cf825184c791ff4f2fccaa1e222ecfcb4e Mon Sep 17 00:00:00 2001 From: ansan johny Date: Sun, 20 Oct 2024 16:52:17 +0530 Subject: [PATCH 1/2] fix:error message --- .../pages/LcDashboard/components/LcAttendeeReport.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/components/LcAttendeeReport.tsx b/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/components/LcAttendeeReport.tsx index ff8f0d44d..589c7a622 100644 --- a/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/components/LcAttendeeReport.tsx +++ b/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/components/LcAttendeeReport.tsx @@ -81,7 +81,7 @@ const LcReportAttendee = () => { formData.append("report", reportText); if (submitedTasks.length === 0) { toast.error( - "Hmmm, please submit proof of work for atleast one task you have done." + "Please submit proof of work for atleast one task you have done." ); return; } From 51004c6008ed670ba538b91e25a83223850a7651 Mon Sep 17 00:00:00 2001 From: ansan johny Date: Sun, 20 Oct 2024 17:37:02 +0530 Subject: [PATCH 2/2] fix:lcmeetup filter --- .../LcDashboard/components/LcMeetups.tsx | 38 ++++++++++++++++++- .../services/LearningCircleAPIs.ts | 7 +++- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/components/LcMeetups.tsx b/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/components/LcMeetups.tsx index 594c2fff5..d64786360 100644 --- a/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/components/LcMeetups.tsx +++ b/src/modules/Dashboard/modules/LearningCircle/pages/LcDashboard/components/LcMeetups.tsx @@ -11,18 +11,37 @@ import { convert24to12, extract24hTimeFromDateTime } from "../../../services/utils"; +import Select from "react-select"; const LcMeetups = ({ user_id }: { user_id: string | null }) => { const navigate = useNavigate(); const [meetups, setMeetups] = useState(); + const [selectedCategory, setSelectedCategories] = useState<{ + label: string; + value: string; + }>(); useEffect(() => { - getMeetups(setMeetups, undefined, user_id ? user_id : undefined) + getMeetups( + setMeetups, + undefined, + user_id ? user_id : undefined, + selectedCategory?.value == "all" + ? undefined + : selectedCategory?.value + ) .then(() => {}) .catch(error => { console.log(error); toast.error("Failed to fetch meetups"); }); - }, [user_id]); + }, [user_id, selectedCategory]); + const categories = [ + { label: "All Categories", value: "all" }, + { label: "Coder", value: "coder" }, + { label: "Hardware", value: "hardware" }, + { label: "Manager", value: "manager" }, + { label: "Creative", value: "creative" } + ]; return (
@@ -31,6 +50,21 @@ const LcMeetups = ({ user_id }: { user_id: string | null }) => { {meetups && meetups.length > 0 ? ( <> Meetups +