From 3e77801a50b8916788e4a21902fa3990b72e8ebf Mon Sep 17 00:00:00 2001 From: Abhishek Pandey Date: Thu, 24 Aug 2023 18:20:07 +0530 Subject: [PATCH 1/5] [ADD]:MyFeed page --- package.json | 1 + .../DiscoverCodelabz/CodelabzCarousel.jsx | 123 ++++++++++++++++++ .../DiscoverCodelabz/CodelabzExplore.jsx | 61 +++++++++ .../MyFeed/discoverOrgs/OrgExplore.jsx | 108 +++++++++++++++ .../discoverOrgs/components/orgsCarousel.jsx | 105 +++++++++++++++ src/components/MyFeed/index.jsx | 51 ++------ 6 files changed, 407 insertions(+), 42 deletions(-) create mode 100644 src/components/MyFeed/DiscoverCodelabz/CodelabzCarousel.jsx create mode 100644 src/components/MyFeed/DiscoverCodelabz/CodelabzExplore.jsx create mode 100644 src/components/MyFeed/discoverOrgs/OrgExplore.jsx create mode 100644 src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx diff --git a/package.json b/package.json index bd3766d5..f0068d9a 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ "redux-thunk": "^2.3.0", "simple-peer": "^9.11.1", "start-server-and-test": "^1.15.3", + "swiper": "^10.2.0", "url": "^0.11.0", "validator": "^13.6.0", "y-quill": "^0.1.5", diff --git a/src/components/MyFeed/DiscoverCodelabz/CodelabzCarousel.jsx b/src/components/MyFeed/DiscoverCodelabz/CodelabzCarousel.jsx new file mode 100644 index 00000000..86c73fa9 --- /dev/null +++ b/src/components/MyFeed/DiscoverCodelabz/CodelabzCarousel.jsx @@ -0,0 +1,123 @@ +import React, { useState, useEffect } from "react"; +import { Swiper, SwiperSlide } from "swiper/react"; +import { Navigation, Pagination } from "swiper/modules"; +import "swiper/css/bundle"; +import "swiper/css"; +import "swiper/css/effect-coverflow"; +import "swiper/css/pagination"; +import Box from "@mui/material/Box"; +import Grid from "@mui/material/Grid"; +import Skeleton from "@mui/material/Skeleton"; +import Card from "@mui/material/Card"; +import CardActionArea from "@mui/material/CardActionArea"; +import CardContent from "@mui/material/CardContent"; +import CardMedia from "@mui/material/CardMedia"; +import Typography from "@mui/material/Typography"; +import Button from "@mui/material/Button"; +import { Paper } from "@mui/material"; +import { makeStyles } from "@mui/styles"; +import { useDispatch, useSelector } from "react-redux"; +import { useFirestore } from "react-redux-firebase"; +import Default from "../../../assets/images/logo.jpeg"; +import { Link } from "react-router-dom"; +import { clearOrgData, getLaunchedOrgsData } from "../../../store/actions"; + +const useStyles = makeStyles(theme => ({ + container: { + margin: "20px 0" + }, + root: { + // boxShadow: "0rem 2rem 2rem gray", + height: "100%", + // zIndex: "2", + display: "flex", + alignItems: "center", + justifyContent: "space-evenly", + flexDirection: "column", + transform: "scale(0.9)" + }, + heading: { + padding: "10px 20px 0", + fontSize: "1.1rem", + fontWeight: "600" + }, + media: { + height: "auto", + minHeight: "100px", + width: "100%" + } +})); + +const CodelabzCarousel = ({ sortBy }) => { + const classes = useStyles(); + const launchedOrgs = useSelector(({ org }) => org.launched.data); + const dispatch = useDispatch(); + const firestore = useFirestore(); + useEffect(() => { + console.log("called"); + getLaunchedOrgsData()(firestore, dispatch); + return () => { + clearOrgData()(dispatch); + }; + }, [firestore, dispatch]); + console.log(launchedOrgs); + const getTitle = () => { + switch (sortBy) { + case "trending": + return "Trending Now"; + case "featured": + return "Featured on Codelabz"; + case "best": + return "Best of this month"; + } + }; + return ( + <> + + + {getTitle()} + + + + {launchedOrgs?.map((org, i) => { + return ( + + + + + + + {org?.org_handle} + + + {org?.org_description} + + + + + + ); + })} + + + + + ); +}; + +export default CodelabzCarousel; diff --git a/src/components/MyFeed/DiscoverCodelabz/CodelabzExplore.jsx b/src/components/MyFeed/DiscoverCodelabz/CodelabzExplore.jsx new file mode 100644 index 00000000..10166c30 --- /dev/null +++ b/src/components/MyFeed/DiscoverCodelabz/CodelabzExplore.jsx @@ -0,0 +1,61 @@ +import React, { useState, useEffect } from "react"; +import Box from "@mui/material/Box"; +import Grid from "@mui/material/Grid"; +import Skeleton from "@mui/material/Skeleton"; +import Card from "@mui/material/Card"; +import CardActionArea from "@mui/material/CardActionArea"; +import CardContent from "@mui/material/CardContent"; +import CardMedia from "@mui/material/CardMedia"; +import Typography from "@mui/material/Typography"; +import Button from "@mui/material/Button"; +import { Tabs, Tab, Paper } from "@mui/material"; +import { makeStyles } from "@mui/styles"; +import { useDispatch, useSelector } from "react-redux"; +import { useFirestore } from "react-redux-firebase"; +import { Link } from "react-router-dom"; +import CodelabzCarousel from "./CodelabzCarousel"; +import TagCard from "../../CardTabs/Tags"; +const useStyles = makeStyles(theme => ({ + container: { + padding: "30px" + }, + heading: { + fontSize: "1.2rem", + fontWeight: "600", + marginBottom: "10px" + }, + subHeading: { + fontSize: "1rem", + marginBottom: "10px", + fontWeight: "400" + } +})); +const CodelabzExplore = () => { + const [selectedTab, setSelectedTab] = useState(0); + const classes = useStyles(); + const dispatch = useDispatch(); + const firestore = useFirestore(); + + const handleTabChange = (e, value) => { + setSelectedTab(value); + }; + + return ( + <> + + + Discover Codelabz + + + Explore top rated Codelabz and find what you are looking for + + + + + + + + ); +}; + +export default CodelabzExplore; diff --git a/src/components/MyFeed/discoverOrgs/OrgExplore.jsx b/src/components/MyFeed/discoverOrgs/OrgExplore.jsx new file mode 100644 index 00000000..ce75432a --- /dev/null +++ b/src/components/MyFeed/discoverOrgs/OrgExplore.jsx @@ -0,0 +1,108 @@ +import React, { useState, useEffect } from "react"; +import Box from "@mui/material/Box"; +import Grid from "@mui/material/Grid"; +import Skeleton from "@mui/material/Skeleton"; +import Card from "@mui/material/Card"; +import CardActionArea from "@mui/material/CardActionArea"; +import CardContent from "@mui/material/CardContent"; +import CardMedia from "@mui/material/CardMedia"; +import Typography from "@mui/material/Typography"; +import Button from "@mui/material/Button"; +import { Tabs, Tab, Paper } from "@mui/material"; +import { makeStyles } from "@mui/styles"; +import { useDispatch, useSelector } from "react-redux"; +import { useFirestore } from "react-redux-firebase"; +import { Link } from "react-router-dom"; +import Carousel from "../Carousel"; +import OrgsCarousel from "./components/orgsCarousel"; +import TagCard from "../../CardTabs/Tags"; +const useStyles = makeStyles(theme => ({ + container: { + padding: "30px 40px 0" + }, + heading: { + fontSize: "1.2rem", + fontWeight: "600", + marginBottom: "10px" + }, + subHeading: { + fontSize: "1rem", + marginBottom: "10px", + fontWeight: "400" + } +})); +const OrgsExplore = () => { + const [selectedTab, setSelectedTab] = useState(0); + const classes = useStyles(); + const dispatch = useDispatch(); + const firestore = useFirestore(); + + const [tags, setTags] = useState([ + "HTML", + "JavaScript", + "Css", + "Python", + "React", + "Java", + "HTML", + "System Design", + "Cyber Security", + "Python", + "Node", + "Django", + "C", + "C++", + "Python", + "GoLang", + "ML", + "AI/ML", + "Cloud", + "DevOps", + "Figma", + "Angular" + ]); + + const handleTabChange = (e, value) => { + setSelectedTab(value); + }; + + return ( + <> + + + Discover Organizations + + + Explore top rated organization and find what you are looking for + + + + + + + + + + + + + + + + + ); +}; + +export default OrgsExplore; diff --git a/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx b/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx new file mode 100644 index 00000000..d55caa3b --- /dev/null +++ b/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx @@ -0,0 +1,105 @@ +import React, { useState, useEffect } from "react"; +import { Swiper, SwiperSlide } from "swiper/react"; +import { Navigation, Pagination } from "swiper/modules"; +import "swiper/css/bundle"; +import "swiper/css"; +import "swiper/css/effect-coverflow"; +import "swiper/css/pagination"; +import Box from "@mui/material/Box"; +import Grid from "@mui/material/Grid"; +import Skeleton from "@mui/material/Skeleton"; +import Card from "@mui/material/Card"; +import CardActionArea from "@mui/material/CardActionArea"; +import CardContent from "@mui/material/CardContent"; +import CardMedia from "@mui/material/CardMedia"; +import Typography from "@mui/material/Typography"; +import Button from "@mui/material/Button"; +import { Paper } from "@mui/material"; +import { makeStyles } from "@mui/styles"; +import { useDispatch, useSelector } from "react-redux"; +import { useFirestore } from "react-redux-firebase"; +import Default from "../../../../assets/images/logo.jpeg"; +import { Link } from "react-router-dom"; +import { clearOrgData, getLaunchedOrgsData } from "../../../../store/actions"; + +const useStyles = makeStyles(theme => ({ + container: { + margin: "20px 0" + }, + root: { + // boxShadow: "0rem 2rem 2rem gray", + height: "100%", + // zIndex: "2", + display: "flex", + alignItems: "center", + justifyContent: "space-evenly", + flexDirection: "column", + transform: "scale(0.9)" + }, + media: { + height: "auto", + minHeight: "200px", + width: "100%" + } +})); + +const OrgsCarousel = () => { + const classes = useStyles(); + const launchedOrgs = useSelector(({ org }) => org.launched.data); + const dispatch = useDispatch(); + const firestore = useFirestore(); + useEffect(() => { + console.log("called"); + getLaunchedOrgsData()(firestore, dispatch); + return () => { + clearOrgData()(dispatch); + }; + }, [firestore, dispatch]); + console.log(launchedOrgs); + return ( + <> + + + + {launchedOrgs?.map((org, i) => { + return ( + + + + + + + {org?.org_handle} + + + {org?.org_description} + + + + + + ); + })} + + + + + ); +}; + +export default OrgsCarousel; diff --git a/src/components/MyFeed/index.jsx b/src/components/MyFeed/index.jsx index 6520ec75..84fe3254 100644 --- a/src/components/MyFeed/index.jsx +++ b/src/components/MyFeed/index.jsx @@ -4,49 +4,16 @@ import Typography from "@mui/material/Typography"; import React from "react"; import PropTypes from "prop-types"; import Carousel from "./Carousel/index"; +import OrgsExplore from "./discoverOrgs/OrgExplore"; +import CodelabzExplore from "./DiscoverCodelabz/CodelabzExplore"; -const MyFeed = ({ - heading = "Explore Codelabz", - title = " Explore top rated Organizations and find the Codelabz you are looking for", - backgroundcolor = "white", - textcolor = "black", -}) => { - return ( - - - - - {heading} - -

{title}

-
- -
-
-
-
- ); -}; - -MyFeed.propTypes = { - heading: PropTypes.string, - title: PropTypes.string, - backgroundcolor: PropTypes.string, - textcolor: PropTypes.string, +const MyFeed = () => { + return ( + + + + + ); }; export default MyFeed; From 5644ba898dd87d53bc6a66b7576147f32109f692 Mon Sep 17 00:00:00 2001 From: Abhishek Pandey Date: Thu, 24 Aug 2023 18:25:11 +0530 Subject: [PATCH 2/5] [ADD]:MyFeed page --- src/components/MyFeed/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MyFeed/index.jsx b/src/components/MyFeed/index.jsx index 84fe3254..b88474c4 100644 --- a/src/components/MyFeed/index.jsx +++ b/src/components/MyFeed/index.jsx @@ -9,7 +9,7 @@ import CodelabzExplore from "./DiscoverCodelabz/CodelabzExplore"; const MyFeed = () => { return ( - + From 3a5fac8e73c45b3d6bac474f0f603da694dfa164 Mon Sep 17 00:00:00 2001 From: Abhishek Pandey Date: Thu, 24 Aug 2023 19:51:47 +0530 Subject: [PATCH 3/5] [ADD]:Skeletons for myFeed --- .../MyFeed/discoverOrgs/OrgExplore.jsx | 2 +- .../discoverOrgs/components/orgsCarousel.jsx | 94 ++++++++++++------- 2 files changed, 59 insertions(+), 37 deletions(-) diff --git a/src/components/MyFeed/discoverOrgs/OrgExplore.jsx b/src/components/MyFeed/discoverOrgs/OrgExplore.jsx index ce75432a..fdc3efe2 100644 --- a/src/components/MyFeed/discoverOrgs/OrgExplore.jsx +++ b/src/components/MyFeed/discoverOrgs/OrgExplore.jsx @@ -96,7 +96,7 @@ const OrgsExplore = () => { }} data-testId="explorePageTag" > - + diff --git a/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx b/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx index d55caa3b..29825c23 100644 --- a/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx +++ b/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx @@ -27,17 +27,15 @@ const useStyles = makeStyles(theme => ({ margin: "20px 0" }, root: { - // boxShadow: "0rem 2rem 2rem gray", height: "100%", - // zIndex: "2", display: "flex", alignItems: "center", justifyContent: "space-evenly", - flexDirection: "column", - transform: "scale(0.9)" + flexDirection: "column" }, media: { height: "auto", + maxHeight: "180px", minHeight: "200px", width: "100%" } @@ -45,54 +43,78 @@ const useStyles = makeStyles(theme => ({ const OrgsCarousel = () => { const classes = useStyles(); - const launchedOrgs = useSelector(({ org }) => org.launched.data); + const launchedOrgs = useSelector(({ org }) => org.launched.data) || [ + 0, 0, 0, 0, 0 + ]; const dispatch = useDispatch(); const firestore = useFirestore(); useEffect(() => { - console.log("called"); getLaunchedOrgsData()(firestore, dispatch); return () => { clearOrgData()(dispatch); }; }, [firestore, dispatch]); - console.log(launchedOrgs); return ( <> - - {launchedOrgs?.map((org, i) => { - return ( + + {launchedOrgs.map((org, i) => { + return org == 0 ? ( - - - - - {org?.org_handle} - - - {org?.org_description} - - - + + + + ) : ( + + + + + + + + {org?.org_handle} + + + {org?.org_description} + + + + + + ); })} From 7364b0c95ead3e5c815f3d90d914d320a5f0c046 Mon Sep 17 00:00:00 2001 From: Abhishek Pandey Date: Fri, 25 Aug 2023 19:30:47 +0530 Subject: [PATCH 4/5] [ADD]:MyFeed page --- .../DiscoverCodelabz/CodelabzCarousel.jsx | 99 ++++++++++----- .../DiscoverCodelabz/CodelabzExplore.jsx | 10 -- .../discoverOrgs/components/orgsCarousel.jsx | 118 +++++++++--------- src/store/actions/tutorialPageActions.js | 4 + 4 files changed, 132 insertions(+), 99 deletions(-) diff --git a/src/components/MyFeed/DiscoverCodelabz/CodelabzCarousel.jsx b/src/components/MyFeed/DiscoverCodelabz/CodelabzCarousel.jsx index 86c73fa9..67fe28c7 100644 --- a/src/components/MyFeed/DiscoverCodelabz/CodelabzCarousel.jsx +++ b/src/components/MyFeed/DiscoverCodelabz/CodelabzCarousel.jsx @@ -17,50 +17,65 @@ import Button from "@mui/material/Button"; import { Paper } from "@mui/material"; import { makeStyles } from "@mui/styles"; import { useDispatch, useSelector } from "react-redux"; -import { useFirestore } from "react-redux-firebase"; +import { useFirestore, useFirebase } from "react-redux-firebase"; import Default from "../../../assets/images/logo.jpeg"; import { Link } from "react-router-dom"; import { clearOrgData, getLaunchedOrgsData } from "../../../store/actions"; +import { + getTutorialFeedIdArray, + getTutorialFeedData +} from "../../../store/actions/tutorialPageActions"; const useStyles = makeStyles(theme => ({ container: { margin: "20px 0" }, root: { - // boxShadow: "0rem 2rem 2rem gray", height: "100%", - // zIndex: "2", display: "flex", alignItems: "center", justifyContent: "space-evenly", - flexDirection: "column", - transform: "scale(0.9)" + flexDirection: "column" + }, + media: { + height: "auto", + maxHeight: "180px", + minHeight: "200px", + width: "100%" }, heading: { padding: "10px 20px 0", fontSize: "1.1rem", fontWeight: "600" - }, - media: { - height: "auto", - minHeight: "100px", - width: "100%" } })); const CodelabzCarousel = ({ sortBy }) => { const classes = useStyles(); - const launchedOrgs = useSelector(({ org }) => org.launched.data); + + const tutorials = useSelector( + ({ tutorialPage }) => tutorialPage.feed.homepageFeedArray + ) || [0, 0, 0, 0, 0, 0]; + const profileData = useSelector(({ firebase: { profile } }) => profile); const dispatch = useDispatch(); const firestore = useFirestore(); + const firebase = useFirebase(); + useEffect(() => { - console.log("called"); - getLaunchedOrgsData()(firestore, dispatch); - return () => { - clearOrgData()(dispatch); + const getFeed = async () => { + const tutorialIdArray = await getTutorialFeedIdArray(profileData.uid)( + firebase, + firestore, + dispatch + ); + getTutorialFeedData(tutorialIdArray)(firebase, firestore, dispatch); }; + getFeed(); + return () => {}; }, [firestore, dispatch]); - console.log(launchedOrgs); + + console.log(tutorials); + const getTitle = () => { switch (sortBy) { case "trending": @@ -77,11 +92,32 @@ const CodelabzCarousel = ({ sortBy }) => { {getTitle()} - - - {launchedOrgs?.map((org, i) => { - return ( - + + {tutorials.map((tutorial, i) => { + return tutorial == 0 ? ( + + + + + + + + ) : ( + + { alt="CodeLabz" component="img" title="CodeLabz" - image={org?.org_image ? org?.org_image : Default} + height={350} + image={ + tutorial?.featured_image + ? tutorial?.featured_image + : Default + } /> { }} > - {org?.org_handle} + {tutorial?.title} - {org?.org_description} + {tutorial?.summary} - - ); - })} - - + + + ); + })} + ); diff --git a/src/components/MyFeed/DiscoverCodelabz/CodelabzExplore.jsx b/src/components/MyFeed/DiscoverCodelabz/CodelabzExplore.jsx index 10166c30..9eae1a29 100644 --- a/src/components/MyFeed/DiscoverCodelabz/CodelabzExplore.jsx +++ b/src/components/MyFeed/DiscoverCodelabz/CodelabzExplore.jsx @@ -1,20 +1,10 @@ import React, { useState, useEffect } from "react"; import Box from "@mui/material/Box"; -import Grid from "@mui/material/Grid"; -import Skeleton from "@mui/material/Skeleton"; -import Card from "@mui/material/Card"; -import CardActionArea from "@mui/material/CardActionArea"; -import CardContent from "@mui/material/CardContent"; -import CardMedia from "@mui/material/CardMedia"; import Typography from "@mui/material/Typography"; -import Button from "@mui/material/Button"; -import { Tabs, Tab, Paper } from "@mui/material"; import { makeStyles } from "@mui/styles"; import { useDispatch, useSelector } from "react-redux"; import { useFirestore } from "react-redux-firebase"; -import { Link } from "react-router-dom"; import CodelabzCarousel from "./CodelabzCarousel"; -import TagCard from "../../CardTabs/Tags"; const useStyles = makeStyles(theme => ({ container: { padding: "30px" diff --git a/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx b/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx index 29825c23..f9210fb5 100644 --- a/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx +++ b/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx @@ -57,68 +57,66 @@ const OrgsCarousel = () => { return ( <> - - - {launchedOrgs.map((org, i) => { - return org == 0 ? ( - + + {launchedOrgs.map((org, i) => { + return org == 0 ? ( + + + + + + + + ) : ( + + - - - - - - ) : ( - - - - - - + + + + {org?.org_handle} + + - - {org?.org_handle} - - - {org?.org_description} - - - - - - - ); - })} - - + {org?.org_description} + + + + + + + ); + })} + ); diff --git a/src/store/actions/tutorialPageActions.js b/src/store/actions/tutorialPageActions.js index cd993d4b..470aceb3 100644 --- a/src/store/actions/tutorialPageActions.js +++ b/src/store/actions/tutorialPageActions.js @@ -8,6 +8,7 @@ export const getTutorialFeedIdArray = followings = await firestore .collection("user_followers") .where("followerId", "==", uid) + .where("isPublished", "==", true) .get() .then(async docs => { const result = []; @@ -28,6 +29,7 @@ export const getTutorialFeedIdArray = followingUsersTutorials = await firestore .collection("tutorials") .where("created_by", "in", followings) + .where("isPublished", "==", true) .limit(50) .get() .then(docs => { @@ -45,6 +47,7 @@ export const getTutorialFeedIdArray = newTutorials = await firestore .collection("tutorials") .where("created_by", "not-in", followings) + .where("isPublished", "==", true) .limit(50) .get() .then(docs => { @@ -58,6 +61,7 @@ export const getTutorialFeedIdArray = } else { newTutorials = await firestore .collection("tutorials") + .where("isPublished", "==", true) .limit(50) .get() .then(docs => { From 01eed28ca2604ad3bcdf8917ae19949baedcce28 Mon Sep 17 00:00:00 2001 From: Abhishek Pandey Date: Fri, 25 Aug 2023 21:43:38 +0530 Subject: [PATCH 5/5] [FIX]:Test --- .../MyFeed/discoverOrgs/OrgExplore.jsx | 18 +++++------------- .../discoverOrgs/components/orgsCarousel.jsx | 8 +------- .../{ExploreOrgs.jsx => oldExploreOrgs.jsx} | 0 3 files changed, 6 insertions(+), 20 deletions(-) rename src/components/MyFeed/{ExploreOrgs.jsx => oldExploreOrgs.jsx} (100%) diff --git a/src/components/MyFeed/discoverOrgs/OrgExplore.jsx b/src/components/MyFeed/discoverOrgs/OrgExplore.jsx index fdc3efe2..169751bc 100644 --- a/src/components/MyFeed/discoverOrgs/OrgExplore.jsx +++ b/src/components/MyFeed/discoverOrgs/OrgExplore.jsx @@ -1,19 +1,9 @@ import React, { useState, useEffect } from "react"; import Box from "@mui/material/Box"; import Grid from "@mui/material/Grid"; -import Skeleton from "@mui/material/Skeleton"; -import Card from "@mui/material/Card"; -import CardActionArea from "@mui/material/CardActionArea"; -import CardContent from "@mui/material/CardContent"; -import CardMedia from "@mui/material/CardMedia"; import Typography from "@mui/material/Typography"; -import Button from "@mui/material/Button"; import { Tabs, Tab, Paper } from "@mui/material"; import { makeStyles } from "@mui/styles"; -import { useDispatch, useSelector } from "react-redux"; -import { useFirestore } from "react-redux-firebase"; -import { Link } from "react-router-dom"; -import Carousel from "../Carousel"; import OrgsCarousel from "./components/orgsCarousel"; import TagCard from "../../CardTabs/Tags"; const useStyles = makeStyles(theme => ({ @@ -34,8 +24,6 @@ const useStyles = makeStyles(theme => ({ const OrgsExplore = () => { const [selectedTab, setSelectedTab] = useState(0); const classes = useStyles(); - const dispatch = useDispatch(); - const firestore = useFirestore(); const [tags, setTags] = useState([ "HTML", @@ -69,7 +57,11 @@ const OrgsExplore = () => { return ( <> - + Discover Organizations diff --git a/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx b/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx index f9210fb5..75ee20b5 100644 --- a/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx +++ b/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx @@ -5,15 +5,11 @@ import "swiper/css/bundle"; import "swiper/css"; import "swiper/css/effect-coverflow"; import "swiper/css/pagination"; -import Box from "@mui/material/Box"; -import Grid from "@mui/material/Grid"; import Skeleton from "@mui/material/Skeleton"; -import Card from "@mui/material/Card"; import CardActionArea from "@mui/material/CardActionArea"; import CardContent from "@mui/material/CardContent"; import CardMedia from "@mui/material/CardMedia"; import Typography from "@mui/material/Typography"; -import Button from "@mui/material/Button"; import { Paper } from "@mui/material"; import { makeStyles } from "@mui/styles"; import { useDispatch, useSelector } from "react-redux"; @@ -50,9 +46,7 @@ const OrgsCarousel = () => { const firestore = useFirestore(); useEffect(() => { getLaunchedOrgsData()(firestore, dispatch); - return () => { - clearOrgData()(dispatch); - }; + return () => {}; }, [firestore, dispatch]); return ( <> diff --git a/src/components/MyFeed/ExploreOrgs.jsx b/src/components/MyFeed/oldExploreOrgs.jsx similarity index 100% rename from src/components/MyFeed/ExploreOrgs.jsx rename to src/components/MyFeed/oldExploreOrgs.jsx