diff --git a/src/frontend/src/pages/CommunityPage/index.tsx b/src/frontend/src/pages/CommunityPage/index.tsx deleted file mode 100644 index c49675ded..000000000 --- a/src/frontend/src/pages/CommunityPage/index.tsx +++ /dev/null @@ -1,115 +0,0 @@ -import { useContext, useEffect, useState } from "react"; -import { Button } from "../../components/ui/button"; -import { alertContext } from "../../contexts/alertContext"; -import { FlowsContext } from "../../contexts/flowsContext"; - -import { useNavigate } from "react-router-dom"; -import CollectionCardComponent from "../../components/cardComponent"; -import IconComponent from "../../components/genericIconComponent"; -import Header from "../../components/headerComponent"; -import { SkeletonCardComponent } from "../../components/skeletonCardComponent"; -import { getExamples } from "../../controllers/API"; -import { FlowType } from "../../types/flow"; -export default function CommunityPage(): JSX.Element { - const { flows, setTabId, downloadFlows, uploadFlows, addFlow } = - useContext(FlowsContext); - - // set null id - useEffect(() => { - setTabId(""); - }, []); - const { setErrorData } = useContext(alertContext); - const [loadingExamples, setLoadingExamples] = useState(false); - const [examples, setExamples] = useState([]); - - // Show community examples on screen - function handleExamples(): void { - setLoadingExamples(true); - getExamples() - .then((result) => { - setLoadingExamples(false); - setExamples(result); - }) - .catch((error) => - setErrorData({ - title: "there was an error loading examples, please try again", - list: [error.message], - }) - ); - } - const navigate = useNavigate(); - - // Show community examples on page start - useEffect(() => { - handleExamples(); - }, []); - return ( - <> -
- -
-
- - - Community Examples - -
- - - -
-
- - Discover and learn from shared examples by the Langflow community. We - welcome new example contributions that can help our community explore - new and powerful features. - -
- {loadingExamples ? ( - <> - - - - - - ) : ( - examples.map((flow, idx) => ( - { - addFlow(true, flow).then((id) => { - navigate("/flow/" + id); - }); - }} - > - - Fork Example - - } - /> - )) - )} -
-
- - ); -} diff --git a/src/frontend/src/routes.tsx b/src/frontend/src/routes.tsx index 40690e569..f257d77a9 100644 --- a/src/frontend/src/routes.tsx +++ b/src/frontend/src/routes.tsx @@ -8,7 +8,6 @@ import { StoreGuard } from "./components/storeGuard"; import AdminPage from "./pages/AdminPage"; import LoginAdminPage from "./pages/AdminPage/LoginPage"; import ApiKeysPage from "./pages/ApiKeysPage"; -import CommunityPage from "./pages/CommunityPage"; import FlowPage from "./pages/FlowPage"; import HomePage from "./pages/MainPage"; import ComponentsComponent from "./pages/MainPage/components/components"; @@ -41,14 +40,6 @@ const Router = () => { } /> } /> - - - - } - />