diff --git a/components/Badge.js b/components/Badge.js
new file mode 100644
index 00000000000..d4c6a6e5636
--- /dev/null
+++ b/components/Badge.js
@@ -0,0 +1,57 @@
+import Link from "./Link";
+
+export default function Badge({
+ title,
+ content,
+ path,
+ position,
+ className,
+ badgeClassName,
+ children,
+ display = true,
+ onClick,
+}) {
+ let css = "";
+ const cssTopRight = "top-0 right-0 bottom-auto left-auto";
+ const cssTopLeft = "top-0 left-0 bottom-auto right-auto";
+ const cssBottomRight = "bottom-0 right-0 top-auto left-auto";
+ const cssBottomLeft = "bottom-0 left-0 top-auto right-auto";
+ switch (position) {
+ case "top-right":
+ css = cssTopRight;
+ break;
+ case "top-left":
+ css = cssTopLeft;
+ break;
+ case "bottom-right":
+ css = cssBottomRight;
+ break;
+ case "bottom-left":
+ css = cssBottomLeft;
+ break;
+ default:
+ css = cssTopRight;
+ }
+
+ const badge = (
+
(onClick ? onClick() : null)}
+ >
+ {content}
+
+ );
+
+ let clickable;
+ if (path) {
+ clickable = {badge};
+ }
+
+ return (
+
+ {children}
+ {display && (clickable ? clickable : badge)}
+
+ );
+}
diff --git a/components/Tag.js b/components/Tag.js
index 5d9545b9583..61276f33ce8 100644
--- a/components/Tag.js
+++ b/components/Tag.js
@@ -1,8 +1,9 @@
import { abbreviateNumber } from "../services/utils/abbreviateNumbers";
+import Badge from "./Badge";
export default function Tag({ name, total, selected, onClick }) {
return (
-
+
{name}
- {total && (
-
- {abbreviateNumber(total)}
-
- )}
-
+
);
}
diff --git a/components/hint/HintIcon.js b/components/hint/HintIcon.js
deleted file mode 100644
index c60df71bf03..00000000000
--- a/components/hint/HintIcon.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import Link from "next/link"
-// import Image from "next/image"
-// import { FaQuestionCircle } from "react-icons";
-import { FaQuestionCircle } from "react-icons/fa";
-import { IconContext } from "react-icons";
-
-
-export default function HintIcon({ path, placeholderText }) {
- return (
-
-
-
-
-
- )
-}
diff --git a/components/user/UserProfile.js b/components/user/UserProfile.js
index 9ea87e225a5..02fa905a1ee 100644
--- a/components/user/UserProfile.js
+++ b/components/user/UserProfile.js
@@ -6,8 +6,8 @@ import { QRCodeSVG } from "qrcode.react";
import FallbackImage from "../FallbackImage";
import UserSocial from "./UserSocials";
import Tag from "../Tag";
-import { abbreviateNumber } from "../../services/utils/abbreviateNumbers";
import Link from "../Link";
+import Badge from "../Badge";
export default function UserProfile({ BASE_URL, data }) {
const [qrShow, setQrShow] = useState(false);
@@ -15,7 +15,12 @@ export default function UserProfile({ BASE_URL, data }) {
return (
<>
-
+
}
+ position="bottom-left"
+ badgeClassName="animate-bounce cursor-pointer"
+ onClick={() => (qrShow ? setQrShow(false) : setQrShow(true))}
+ >
-
(qrShow ? setQrShow(false) : setQrShow(true))}
- >
-
-
-
+
{data.name}
diff --git a/data/krupalitrivedi.json b/data/krupalitrivedi.json
index b261b0e0f9f..fee675faa23 100644
--- a/data/krupalitrivedi.json
+++ b/data/krupalitrivedi.json
@@ -8,9 +8,7 @@
{ "icon": "FaGithub", "url": "https://github.com/krupalitrivedi" },
{ "icon": "SiHashnode", "url": "https://acodeandaword.hashnode.dev/" }
],
- "testimonials":[
- "shubhsharma19",
- "Njong392"],
+ "testimonials": ["shubhsharma19", "Njong392"],
"links": [
{
diff --git a/pages/events.js b/pages/events.js
index 685b44d952d..6a2f25de866 100644
--- a/pages/events.js
+++ b/pages/events.js
@@ -6,7 +6,7 @@ import EventCard from "../components/event/EventCard";
import Page from "../components/Page";
import { EventTabs } from "../components/event/EventTabs";
import PageHead from "../components/PageHead";
-import HintIcon from "../components/hint/HintIcon";
+import Badge from "../components/Badge";
export async function getServerSideProps(context) {
let events = [];
@@ -74,11 +74,13 @@ export default function Events({ events }) {
-
Community events
-
+
+ Community events
+
-
+
+
{notFound && }
{filteredUsers.map((user) => (