visortelle commented on code in PR #789:
URL: https://github.com/apache/pulsar-site/pull/789#discussion_r1500270554
##########
src/components/pages/CommunityPage/CommunityPage.tsx:
##########
@@ -1,29 +1,68 @@
-import React from "react";
+import React, { useState } from "react";
import Layout from "@theme/Layout";
import s from "./CommunityPage.module.css";
import useBaseUrl from "@docusaurus/useBaseUrl";
-import TeamTable from "@site/src/components/pages/CommunityPage/TeamTable";
import team from "@site/data/team";
+import communityNumbers from "@site/data/community-numbers";
import DiscussionPlatforms from "./sections/discussions/DiscussionPlatforms";
import HowToContribute from "./sections/how-to-contribute/HowToContribute";
import Section from "./shared/Section/Section";
import ProjectGovernance from
"./sections/project-governance/ProjectGovernance";
import Slider from '@site/src/components/ui/Slider/Slider';
-import Page from "@site/src/components/ui/Page/Page";
import BrowserOnly from "@docusaurus/BrowserOnly";
import Button from "@site/src/components/ui/Button/Button";
export default function CommunityPage(): JSX.Element {
+
+ const [isShowMorePMC, setIsShowMorePMC] = useState(false);
+ const showMorePMCButton = (
+ <Button title={isShowMorePMC ? 'Show less' : 'Show more'}
variant="transparentWhite" onClick={() => setIsShowMorePMC(!isShowMorePMC)}/>
+ );
+
+ const [isShowMoreCmtrs, setIsShowMoreCmtrs] = useState(false);
+ const showMoreCmtrsButton = (
+ <Button title={isShowMoreCmtrs ? 'Show less' : 'Show more'}
variant="transparentWhite" onClick={() =>
setIsShowMoreCmtrs(!isShowMoreCmtrs)}/>
+ );
+
+ const forbiddenUsers = ['jianghaiting', 'technoboy', 'linlin']
Review Comment:
This piece of code looks a bit odd too me.
Could we just add an optional `githubId` field here:
https://github.com/apache/pulsar-site/blob/aaaffa8d674107021fd7f8bea7c880ea69f074fd/data/team.js#L5
Probably make it optional and take `githubId` by default with a fallback to
`apacheId`.
##########
src/components/pages/CommunityPage/CommunityPage.tsx:
##########
@@ -1,29 +1,68 @@
-import React from "react";
+import React, { useState } from "react";
import Layout from "@theme/Layout";
import s from "./CommunityPage.module.css";
import useBaseUrl from "@docusaurus/useBaseUrl";
-import TeamTable from "@site/src/components/pages/CommunityPage/TeamTable";
import team from "@site/data/team";
+import communityNumbers from "@site/data/community-numbers";
import DiscussionPlatforms from "./sections/discussions/DiscussionPlatforms";
import HowToContribute from "./sections/how-to-contribute/HowToContribute";
import Section from "./shared/Section/Section";
import ProjectGovernance from
"./sections/project-governance/ProjectGovernance";
import Slider from '@site/src/components/ui/Slider/Slider';
-import Page from "@site/src/components/ui/Page/Page";
import BrowserOnly from "@docusaurus/BrowserOnly";
import Button from "@site/src/components/ui/Button/Button";
export default function CommunityPage(): JSX.Element {
+
+ const [isShowMorePMC, setIsShowMorePMC] = useState(false);
+ const showMorePMCButton = (
+ <Button title={isShowMorePMC ? 'Show less' : 'Show more'}
variant="transparentWhite" onClick={() => setIsShowMorePMC(!isShowMorePMC)}/>
+ );
+
+ const [isShowMoreCmtrs, setIsShowMoreCmtrs] = useState(false);
+ const showMoreCmtrsButton = (
+ <Button title={isShowMoreCmtrs ? 'Show less' : 'Show more'}
variant="transparentWhite" onClick={() =>
setIsShowMoreCmtrs(!isShowMoreCmtrs)}/>
+ );
+
+ const forbiddenUsers = ['jianghaiting', 'technoboy', 'linlin']
Review Comment:
This piece of code looks a bit odd to me.
Could we just add an optional `githubId` field here:
https://github.com/apache/pulsar-site/blob/aaaffa8d674107021fd7f8bea7c880ea69f074fd/data/team.js#L5
Probably make it optional and take `githubId` by default with a fallback to
`apacheId`.
--
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]