visortelle commented on code in PR #789:
URL: https://github.com/apache/pulsar-site/pull/789#discussion_r1488433099


##########
src/components/pages/CommunityPage/sections/discussions/DiscussionPlatforms.tsx:
##########
@@ -1,54 +1,118 @@
 import React from "react";
 import useBaseUrl from "@docusaurus/useBaseUrl";
-import { ContentCardProps } from "../../shared/ContentCard/ContentCard";
-import ContentCardsLayout from "../../shared/ContentCard/ContentCardsLayout";
+import Button, { ButtonVariant } from "@site/src/components/ui/Button/Button";
+import s from "./DiscussionPlatforms.module.css";
+import Slider from '@site/src/components/ui/Slider/Slider';
+import BrowserOnly from "@docusaurus/BrowserOnly";
+
+type ActionButtonProps = {
+  id: string;
+  text: string;
+  href: string;
+  type: "primary" | "normal" | "link";
+  isExternal?: boolean;
+};
+
+export type ContentCardProps = {
+  title: string;
+  description: React.ReactNode;
+  image?: {
+    src: string;
+  };
+  actions?: ActionButtonProps[];
+};
+
+const ContentCard: React.FC<ContentCardProps> = (props) => {
+  return (
+    <div className={s.DiscussionPlatformCard}>
+      {props.image && (
+        <div className={s.DiscussionPlatformCardImage}>
+          <img src={props.image.src} />
+        </div>
+      )}
+      <div className={s.DiscussionPlatformCardText}>
+        <h3>{props.title}</h3>
+        <div>{props.description}</div>
+      </div>
+      <div className={s.DiscussionPlatformCardActions}>
+        {(props.actions || []).map((action) => (
+          <ActionButton key={action.id} {...action} />
+        ))}
+      </div>
+    </div>
+  );
+};
+
+const ActionButton: React.FC<ActionButtonProps> = (props) => {
+  if (props.type === "link") {
+  }
+
+  let buttonVariant: ButtonVariant;
+  switch (props.type) {
+    case "primary":
+      buttonVariant = "transparentblack";
+      break;
+    case "normal":
+      buttonVariant = "clean";
+      break;
+  }
+
+  return (
+    <div className={s.ActionButton}>
+      <Button
+        variant={buttonVariant}
+        target={props.isExternal ? "_blank" : undefined}
+        href={props.href}
+        title={props.text}
+      />
+    </div>
+
+  );
+};
 
 const DiscussionPlatforms: React.FC = () => {
   const platforms: ContentCardProps[] = [
     {
-      title: "User Mailing List",
+      title: "Slack",
       description: (
-        <div>
-          General mailing list for user-related discussions.
+        <span>
+          Use it for instant messaging and real-time discussions.
           <br />
-          <a
-            href="https://lists.apache.org/[email protected]";
-            target="_blank"
-          >
-            Access the archives
-          </a>
-        </div>
+          You can search the Slack discussions history on <a 
href="https://www.linen.dev/s/apache-pulsar"; target="_blank">Linen</a>.
+        </span>
       ),
       actions: [
-        {
-          id: "subscribe",
-          text: "Subscribe",
-          href: "mailto:[email protected]";,
+        /*{

Review Comment:
   Do we need the commented code here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to