diff --git a/src/modules/Dashboard/modules/LearningCircleV2/pages/dashboard/DashboardLC.module.css b/src/modules/Dashboard/modules/LearningCircleV2/pages/dashboard/DashboardLC.module.css index b5c33d2ed..d0414e58a 100644 --- a/src/modules/Dashboard/modules/LearningCircleV2/pages/dashboard/DashboardLC.module.css +++ b/src/modules/Dashboard/modules/LearningCircleV2/pages/dashboard/DashboardLC.module.css @@ -65,7 +65,29 @@ color: #000; display: flex; gap: 10px; - margin-bottom: 20px; + margin-bottom: 10px; + } + .buttons { + margin-bottom: 10px; + width: fit-content; + display: flex; + gap: 10px; + flex-direction: row; + justify-content: center; + align-items: center; + .tag { + cursor: pointer; + display: flex; + width: fit-content; + justify-content: center; + align-items: center; + gap: 10px; + border: 2px dashed #547cff; + padding: 4px 15px; + color: #547cff; + border-radius: 10px; + font-size: 12px; + } } } .buttons { diff --git a/src/modules/Dashboard/modules/LearningCircleV2/pages/dashboard/DashboardLC.tsx b/src/modules/Dashboard/modules/LearningCircleV2/pages/dashboard/DashboardLC.tsx index e4b6811b2..89d6cd23e 100644 --- a/src/modules/Dashboard/modules/LearningCircleV2/pages/dashboard/DashboardLC.tsx +++ b/src/modules/Dashboard/modules/LearningCircleV2/pages/dashboard/DashboardLC.tsx @@ -9,8 +9,9 @@ import { getLocalDateTimeObject } from "../../../../utils/common"; import { PowerfulButton } from "@/MuLearnComponents/MuButtons/MuButton"; -import { BiChevronRight, BiEdit } from "react-icons/bi"; +import { BiChevronRight, BiCopy, BiEdit } from "react-icons/bi"; import { FiChevronLeft } from "react-icons/fi"; +import toast from "react-hot-toast"; export default function DashboardLC() { const [circleInfo, setCircleInfo] = useState( @@ -51,6 +52,57 @@ export default function DashboardLC() { {circleInfo.next_meetup.title} +
+ {/* { + var url = + `${window.location.protocol}//${window.location.host}/dashboard/learningcircle/meetup/${circleInfo.next_meetup.id}` + + (circleInfo.next_meetup + .is_started + ? `?code=${circleInfo.next_meetup.meet_code}` + : ""); + navigator.clipboard + .writeText(url) + .then(() => { + toast.success( + "Copied to Clipboard!" + ); + }) + .catch(error => { + toast.error( + "Failed to copy" + ); + }); + }} + className={styles.tag} + > + + Copy Link + */} + { + navigator.clipboard + .writeText( + circleInfo.next_meetup + .meet_code + ) + .then(() => { + toast.success( + "Copied to Clipboard!" + ); + }) + .catch(error => { + toast.error( + "Failed to copy" + ); + }); + }} + > + + {circleInfo.next_meetup.meet_code} + +
Venue:{" "} {circleInfo.next_meetup.meet_place} diff --git a/src/modules/Dashboard/modules/LearningCircleV2/pages/landing/LearningCircleLanding.tsx b/src/modules/Dashboard/modules/LearningCircleV2/pages/landing/LearningCircleLanding.tsx index 77c261b52..7ee89b53a 100644 --- a/src/modules/Dashboard/modules/LearningCircleV2/pages/landing/LearningCircleLanding.tsx +++ b/src/modules/Dashboard/modules/LearningCircleV2/pages/landing/LearningCircleLanding.tsx @@ -310,9 +310,10 @@ const LearningCircleLanding = () => { */}
- {!event.attendee || - (event.attendee && - !event.attendee.is_joined) ? ( + {!event.is_started && + (!event.attendee || + (event.attendee && + !event.attendee.is_joined)) ? (