Skip to content

Commit

Permalink
changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Hemu21 committed May 27, 2024
1 parent f1629d8 commit eb2ad3f
Show file tree
Hide file tree
Showing 2 changed files with 157 additions and 156 deletions.
Binary file added frontend/public/images/founder.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
313 changes: 157 additions & 156 deletions frontend/src/pages/About/About.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const useStyles = makeStyles(() => ({
export const About = (props) => {
let dark = props.theme;
const [team, setTeam] = useState([]);
const [image, setImage] = useState([]);
useEffect(() => {
getTeam();
}, []);
Expand All @@ -35,7 +36,19 @@ export const About = (props) => {
teams: item.teams[0].split(","),
};
});
let _image = [];
await _data?.map((item) => {
let formattedPath = item.image?.replace(/\\/g, "/");
if (formattedPath?.startsWith("uploads/")) {
formattedPath = formattedPath.replace("uploads/", "");
if (formattedPath) {
formattedPath = `${END_POINT}/${formattedPath}`;
}
}
_image.push({ image: formattedPath, id: item._id });
});
setTeam(_data);
setImage(_image);
} catch (error) {
console.error(error);
}
Expand Down Expand Up @@ -118,80 +131,61 @@ export const About = (props) => {
}
></div>
<div className={style["row1"]}>
{Object.keys(teamData).map((role) => {
if (role !== "member") {
return teamData[role].map((roleObject) => {
return (
<div
className={
dark
? `${style["card1"]} ${style["card1-dark"]}`
: `${style["card1"]} ${style["card1-light"]}`
}
>
<div className={style["photo"]}>
<img
alt="profile"
className={style["cover"]}
src={roleObject.profile_pic}
/>
<div className={style["team-social"]}>
<i
href={roleObject.linkedin}
className={
dark
? `${style["card-footer"]} + fab fa-linkedin fa-2x in in-dark`
: `${style["card-footer"]} + fab fa-linkedin fa-2x in in-light`
}
></i>
<i
href={roleObject.twitter}
className={
dark
? `${style["card-footer"]} fab fa-twitter-square fa-twitter-square-dark fa-2x`
: `${style["card-footer"]} fab fa-twitter-square fa-twitter-square-light fa-2x`
}
></i>
<i
href={roleObject.github}
className={
dark
? `${style["card-footer"]} fab fa-github-square fa-github-square-dark fa-2x`
: `${style["card-footer"]} fab fa-github-square fa-github-square-light fa-2x`
}
></i>
</div>
</div>
<div className={classes.details}>
<CardContent
className={classes.content}
id={style["content"]}
>
<Typography
component="h6"
variant="h6"
id={style["Mui-h6"]}
>
{roleObject.name}
</Typography>
<MDBBadge
pill
className={style["info"] + ` ` + style["badge"]}
>
{role.toUpperCase()}
</MDBBadge>
<div>
<p id={style["intro"]}>{roleObject.description}</p>
</div>
<br />
</CardContent>
</div>
</div>
);
});
<div
className={
dark
? `${style["card1"]} ${style["card1-dark"]}`
: `${style["card1"]} ${style["card1-light"]}`
}
return null;
})}
>
<div className={style["photo"]}>
<img
alt="profile"
className={style["cover"]}
src={"./images/founder.jpeg"}
/>
<div className={style["team-social"]}>
<i
onClick={() => window.open("https://www.linkedin.com/in/kajol-kumari-73245b166/", "_blank")}
className={
dark
? `${style["card-footer"]} + fab fa-linkedin fa-2x in in-dark`
: `${style["card-footer"]} + fab fa-linkedin fa-2x in in-light`
}
></i>
<i
onClick={() => window.open("https://x.com/_Kajol_singh_", "_blank")}
className={
dark
? `${style["card-footer"]} fab fa-twitter-square fa-twitter-square-dark fa-2x`
: `${style["card-footer"]} fab fa-twitter-square fa-twitter-square-light fa-2x`
}
></i>
<i
onClick={()=>window.open("https://github.com/Kajol-Kumari", "_blank")}
className={
dark
? `${style["card-footer"]} fab fa-github-square fa-github-square-dark fa-2x`
: `${style["card-footer"]} fab fa-github-square fa-github-square-light fa-2x`
}
></i>
</div>
</div>
<div className={classes.details}>
<CardContent className={classes.content} id={style["content"]}>
<Typography component="h6" variant="h6" id={style["Mui-h6"]}>
{"Kajol Kumari"}
</Typography>
<MDBBadge pill className={style["info"] + ` ` + style["badge"]}>
{"founder".toUpperCase()}
</MDBBadge>
<div>
<p id={style["intro"]}>{"I am a Software Developer who ❀ contributing to open source"}</p>
</div>
<br />
</CardContent>
</div>
</div>
</div>

<Typography
Expand All @@ -208,93 +202,100 @@ export const About = (props) => {
}
></div>
<div className={style["row2"]}>
{ team.map((roleObject,index) => {
return (
<div
key={index}
className={
dark
? `${style["card1"]} ${style["card1-dark"]}`
: `${style["card1"]} ${style["card1-light"]}`
{team.map((roleObject, index) => {
return (
<div
key={index}
className={
dark
? `${style["card1"]} ${style["card1-dark"]}`
: `${style["card1"]} ${style["card1-light"]}`
}
>
<div className={style["photo"]}>
<img
alt="profile"
className={style["cover"]}
src={
(image[index]?.id == roleObject?._id &&
image[index]?.image) ||
"./images/defaultUser.png"
}
/>
<div className={style["team-social"]}>
<i
href={roleObject.linkedin_url}
onClick={() =>
window.open(roleObject.linkedin_url, "_blank")
}
className={
dark
? `${style["card-footer"]} fab fa-linkedin fa-2x in in-dark`
: `${style["card-footer"]} fab fa-linkedin fa-2x in in-light`
}
></i>
<i
href={roleObject.twitter_url}
onClick={() =>
window.open(roleObject.twitter_url, "_blank")
}
className={
dark
? `${style["card-footer"]} fab fa-twitter-square fa-twitter-square-dark fa-2x`
: `${style["card-footer"]} fab fa-twitter-square fa-twitter-square-light fa-2x`
}
></i>
<i
href={roleObject.github_url}
onClick={() =>
window.open(roleObject.github_url, "_blank")
}
className={
dark
? `${style["card-footer"]} fab fa-github-square fa-github-square-dark fa-2x`
: `${style["card-footer"]} fab fa-github-square fa-github-square-light fa-2x`
}
></i>
</div>
</div>
<div className={classes.details}>
<CardContent
className={classes.content}
id={style["content"]}
>
<div className={style["photo"]}>
<img
alt="profile"
className={style["cover"]}
src={roleObject.image||"./images/defaultUser.png"}
/>
<div className={style["team-social"]}>
<i
href={roleObject.linkedin_url}
onClick={() => window.open(roleObject.linkedin_url,"_blank")}
className={
dark
? `${style["card-footer"]} fab fa-linkedin fa-2x in in-dark`
: `${style["card-footer"]} fab fa-linkedin fa-2x in in-light`
}
></i>
<i
href={roleObject.twitter_url}
onClick={() => window.open(roleObject.twitter_url,"_blank")}
className={
dark
? `${style["card-footer"]} fab fa-twitter-square fa-twitter-square-dark fa-2x`
: `${style["card-footer"]} fab fa-twitter-square fa-twitter-square-light fa-2x`
}
></i>
<i
href={roleObject.github_url}
onClick={() => window.open(roleObject.github_url,"_blank")}
className={
dark
? `${style["card-footer"]} fab fa-github-square fa-github-square-dark fa-2x`
: `${style["card-footer"]} fab fa-github-square fa-github-square-light fa-2x`
}
></i>
</div>
<Typography
component="h6"
variant="h6"
id={style["Mui-h6"]}
>
{roleObject?.full_name}
</Typography>
<div>
<p id={style["intro"]}>{roleObject?.description}</p>
</div>
<div className={classes.details}>
<CardContent
className={classes.content}
id={style["content"]}
>
<Typography
component="h6"
variant="h6"
id={style["Mui-h6"]}
>
{roleObject?.full_name}
</Typography>
<div>
<p id={style["intro"]}>{roleObject?.description}</p>
</div>
<div className={style["badge-container"]}>
{roleObject?.teams?.map((badge) => {
return (
<MDBBadge
className={
(badge === "open-source" &&
style["primary"]) ||
(badge === "social" &&
style["default"]) ||
(badge === "broadcast" &&
style["broadcast"]) ||
(badge === "design" && style["info"]) ||
(badge === "resource-sharing" && style["info"])
}
>
{badge}
</MDBBadge>
);
})}
</div>
<br />
</CardContent>
<div className={style["badge-container"]}>
{roleObject?.teams?.map((badge) => {
return (
<MDBBadge
className={
(badge === "open-source" && style["primary"]) ||
(badge === "social" && style["default"]) ||
(badge === "broadcast" && style["broadcast"]) ||
(badge === "design" && style["info"]) ||
(badge === "resource-sharing" && style["info"])
}
>
{badge}
</MDBBadge>
);
})}
</div>
</div>
);
})}
<br />
</CardContent>
</div>
</div>
);
})}
</div>
</div>
</div>
Expand Down

0 comments on commit eb2ad3f

Please sign in to comment.