Skip to content

Commit

Permalink
Merge pull request #1681 from gtech-mulearn/dev
Browse files Browse the repository at this point in the history
Dev Server
  • Loading branch information
aswanthabam authored Nov 5, 2024
2 parents 9b485ce + 83e6f94 commit 6022168
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<LearningCircleInfo | null>(
Expand Down Expand Up @@ -51,6 +52,57 @@ export default function DashboardLC() {
<span className={styles.title}>
{circleInfo.next_meetup.title}
</span>
<div className={styles.buttons}>
{/* <span
onClick={() => {
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}
>
<BiCopy />
Copy Link
</span> */}
<span
className={styles.tag}
onClick={() => {
navigator.clipboard
.writeText(
circleInfo.next_meetup
.meet_code
)
.then(() => {
toast.success(
"Copied to Clipboard!"
);
})
.catch(error => {
toast.error(
"Failed to copy"
);
});
}}
>
<BiCopy />
{circleInfo.next_meetup.meet_code}
</span>
</div>
<span className={styles.venue}>
Venue:{" "}
{circleInfo.next_meetup.meet_place}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,10 @@ const LearningCircleLanding = () => {
</span> */}
</div>
<div className={styles.footer}>
{!event.attendee ||
(event.attendee &&
!event.attendee.is_joined) ? (
{!event.is_started &&
(!event.attendee ||
(event.attendee &&
!event.attendee.is_joined)) ? (
<PowerfulButton
variant={
event.attendee
Expand Down

0 comments on commit 6022168

Please sign in to comment.