Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This is closed due to some issues don't go through it. #83

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"logs": "firebase functions:log"
},
"engines": {
"node": "10"
"node": "16"
},
"dependencies": {
"dotenv": "^16.0.1",
Expand Down
4 changes: 2 additions & 2 deletions src/components/Footer/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Footer = () => {
justifyContent: "flex-start"
}
});
const classes = useStyles();
const classes = useStyles;
return (
<footer className="light-grey-bg pt-16 pb-16">
<Grid container direction="row">
Expand All @@ -33,7 +33,7 @@ const Footer = () => {
<BrandName />
</Link>
</h2>
<p className="mb-">Live to learn, learn to live.</p>
<p className="mb-8">Live to learn, learn to live.</p>
</Grid>

<Grid item xs={12} sm={12} md={3} className="col-pad-24">
Expand Down
12 changes: 8 additions & 4 deletions src/components/MyFeed/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ import PropTypes from "prop-types";
import Carousel from "./Carousel/index";
import OrgsExplore from "./discoverOrgs/OrgExplore";
import CodelabzExplore from "./DiscoverCodelabz/CodelabzExplore";
import Footer from "../Footer";

const MyFeed = () => {
return (
<Box style={{ background: "#F9F9F9", color: "#000000", height: "100%" }}>
<OrgsExplore />
<CodelabzExplore />
</Box>
<>
<Box style={{ background: "#F9F9F9", color: "#000000", height: "100%" }}>
<OrgsExplore />
<CodelabzExplore />
</Box>
<Footer />
</>
);
};

Expand Down
2 changes: 2 additions & 0 deletions src/components/Notification/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import CardWithoutPicture from "../Card/CardWithoutPicture";
import { MoreVertOutlined } from "@mui/icons-material";
import NotificationBox from "./NotificationBox";
import { notifications } from "./notifications";
import Footer from "../Footer";
const Notification = ({ background = "white", textColor = "black" }) => {
const classes = useStyles();
const [openMenu, setOpen] = useState(false);
Expand Down Expand Up @@ -168,6 +169,7 @@ const Notification = ({ background = "white", textColor = "black" }) => {
</Grid>
</Grid>
</section>
<Footer />
</>
);
};
Expand Down
222 changes: 113 additions & 109 deletions src/components/Organization/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { useFirebase, useFirestore } from "react-redux-firebase";
import { unPublishOrganization } from "../../store/actions";
import useWindowSize from "../../helpers/customHooks/useWindowSize";
import { useParams } from "react-router-dom";
import Footer from "../Footer";

const Organizations = () => {
//Set All the organisations for this user
Expand Down Expand Up @@ -93,118 +94,121 @@ const Organizations = () => {
const orgsOfUser = profileData.organizations;

return (
<Container maxWidth="xl">
<Grid container className={classes.root} direction="column">
<Grid item>
<SwitchAccount
Heading="Switch Account"
name={currentOrgData.org_handle}
userOrgs={orgsOfUser}
avatar={{
value: currentOrgData.org_image
}}
buttonText={
currentOrgUpdate
? "Loading.."
: currentOrgData.org_published
? "Unpublish"
: "Publish"
}
buttonClick={unpublishOrganization}
/>
</Grid>
<Grid item container direction="row">
{windowSize.width <= 750 ? (
<Grid item>
<IconButton onClick={handleClick}>
<MenuIcon />
</IconButton>
<Menu
elevation={10}
open={open}
anchorEl={anchorEl}
keepMounted
onClose={handleClose}
style={{
marginTop: "3rem",
zIndex: 999999
}}
>
{[
{
id: 1,
name: "General",
datatestid: "general-menu-item"
},
{
id: 2,
name: "Users",
datatestid: "users-menu-item"
},
{
id: 3,
name: "Passwords",
datatestid: "passwords-menu-item"
},
{
id: 4,
name: "Social media",
datatestid: "socialmedia-menu-item"
}
].map(item => {
return (
<MenuItem
key={`menu-item-${item.id}`}
onClick={() => setSettingsMenu(item.id)}
>{`${item.name}`}</MenuItem>
);
})}
</Menu>
</Grid>
) : (
<Grid item container xs={2}>
<SideBar
toggleSlider={toggleSlider}
open={openMenu}
menuItems={[
{
id: 1,
name: "General",
datatestid: "general-menu-item"
},
{
id: 2,
name: "Users",
datatestid: "users-menu-item"
},
{
id: 3,
name: "Passwords",
datatestid: "passwords-menu-item"
},
{
id: 4,
name: "Social media",
datatestid: "socialmedia-menu-item"
}
]}
value={SettingsMenu}
onStateChange={item => {
setSettingsMenu(item.id);
}}
/>
</Grid>
)}
<>
<Container maxWidth="xl" style={{ minHeight: "80vh" }}>
<Grid container className={classes.root} direction="column">
<Grid item>
<SwitchAccount
Heading="Switch Account"
name={currentOrgData.org_handle}
userOrgs={orgsOfUser}
avatar={{
value: currentOrgData.org_image
}}
buttonText={
currentOrgUpdate
? "Loading.."
: currentOrgData.org_published
? "Unpublish"
: "Publish"
}
buttonClick={unpublishOrganization}
/>
</Grid>
<Grid item container direction="row">
{windowSize.width <= 750 ? (
<Grid item>
<IconButton onClick={handleClick}>
<MenuIcon />
</IconButton>
<Menu
elevation={10}
open={open}
anchorEl={anchorEl}
keepMounted
onClose={handleClose}
style={{
marginTop: "3rem",
zIndex: 999999
}}
>
{[
{
id: 1,
name: "General",
datatestid: "general-menu-item"
},
{
id: 2,
name: "Users",
datatestid: "users-menu-item"
},
{
id: 3,
name: "Passwords",
datatestid: "passwords-menu-item"
},
{
id: 4,
name: "Social media",
datatestid: "socialmedia-menu-item"
}
].map(item => {
return (
<MenuItem
key={`menu-item-${item.id}`}
onClick={() => setSettingsMenu(item.id)}
>{`${item.name}`}</MenuItem>
);
})}
</Menu>
</Grid>
) : (
<Grid item container xs={2}>
<SideBar
toggleSlider={toggleSlider}
open={openMenu}
menuItems={[
{
id: 1,
name: "General",
datatestid: "general-menu-item"
},
{
id: 2,
name: "Users",
datatestid: "users-menu-item"
},
{
id: 3,
name: "Passwords",
datatestid: "passwords-menu-item"
},
{
id: 4,
name: "Social media",
datatestid: "socialmedia-menu-item"
}
]}
value={SettingsMenu}
onStateChange={item => {
setSettingsMenu(item.id);
}}
/>
</Grid>
)}

<Grid item xs={windowSize.width <= 750 ? 12 : 10}>
{SettingsMenu === 1 && <General />}
{SettingsMenu === 2 && <Users />}
{SettingsMenu === 3 && <Passwords />}
{SettingsMenu === 4 && <Socialmedia />}
<Grid item xs={windowSize.width <= 750 ? 12 : 10}>
{SettingsMenu === 1 && <General />}
{SettingsMenu === 2 && <Users />}
{SettingsMenu === 3 && <Passwords />}
{SettingsMenu === 4 && <Socialmedia />}
</Grid>
</Grid>
</Grid>
</Grid>
</Container>
</Container>
<Footer />
</>
);
};

Expand Down
2 changes: 2 additions & 0 deletions src/components/Profile/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from "react";
import UserProfile from "../User/UserProfile/UserProfile";
import { useFirebase, useFirestore } from "react-redux-firebase";
import { useDispatch, useSelector } from "react-redux";
import Footer from "../Footer";

const Profile = () => {
const firebase = useFirebase();
Expand All @@ -14,6 +15,7 @@ const Profile = () => {
return (
<React.Fragment>
<UserProfile profileData={profileData} />
<Footer />
</React.Fragment>
);
};
Expand Down
32 changes: 18 additions & 14 deletions src/components/Tutorials/MyTutorials/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
// import UserTutorialsComponent from "./UserTutorials";
import OrgTutorialsComponent from "./OrgTutorials";
import Header from "./Search";
import Footer from "../../Footer";

const MyTutorials = () => {
const [org_handles, setOrgHandles] = useState([]);
Expand Down Expand Up @@ -75,21 +76,24 @@ const MyTutorials = () => {
};

return (
<div className="row-footer-below" data-testId="tutorialMainBody">
<Grid container>
<Grid xs={12} className="mb-24">
<Header />
</Grid>
{organizations && organizations.length > 0 && (
<Grid xs={12} className="m-24">
<OrgTutorialsComponent
organizations={organizations}
user={userDetails}
/>
<>
<div className="row-footer-below" data-testId="tutorialMainBody" style={{minHeight:"80vh"}}>
<Grid container>
<Grid xs={12} className="mb-24">
<Header />
</Grid>
)}
</Grid>
</div>
{organizations && organizations.length > 0 && (
<Grid xs={12} className="m-24">
<OrgTutorialsComponent
organizations={organizations}
user={userDetails}
/>
</Grid>
)}
</Grid>
</div>
<Footer />
</>
);
};

Expand Down
Loading