From 21dbf0565a178ac47c5953601f6b00bbaac8987f Mon Sep 17 00:00:00 2001 From: Nourhan hasan Date: Tue, 12 Mar 2024 21:33:58 +0300 Subject: [PATCH 1/3] Fix StoryBook Spelling Mistake --- src/stories/AuthPage/ForgotPassword/index.stories.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stories/AuthPage/ForgotPassword/index.stories.jsx b/src/stories/AuthPage/ForgotPassword/index.stories.jsx index f0ac3245..cb492796 100644 --- a/src/stories/AuthPage/ForgotPassword/index.stories.jsx +++ b/src/stories/AuthPage/ForgotPassword/index.stories.jsx @@ -4,7 +4,7 @@ import ProviderWrapper from "../../../helpers/providerWrapper"; import { MemoryRouter } from "react-router-dom"; export default { - title: "AuthPage/Froget Password Page", + title: "AuthPage/Forget Password Page", component: ForgotPassword, argTypes: { rootBackground: { From 54f8c8e79a4b82690e903778473840496be9fda7 Mon Sep 17 00:00:00 2001 From: Nourhan hasan Date: Wed, 13 Mar 2024 12:13:52 +0300 Subject: [PATCH 2/3] change Twitter to X without storybook --- .../organization/organization.cy.js | 2 +- .../e2e/components/profile/SocialIcons.cy.js | 2 +- .../components/profile/user-dashboard.cy.js | 4 +- src/App.less | 12 +++--- .../AuthPage/smButton/smButtons.jsx | 8 ++-- src/components/AuthPage/smButton/styles.jsx | 4 +- src/components/Forms/UserForm/index.jsx | 28 +++++++------- src/components/Forms/UserForm/styles.jsx | 4 +- .../OrgInfoCard/editOrgDetailsModal.jsx | 14 +++---- .../Organization/OrgInfoCard/orgInfoCard.jsx | 10 ++--- .../OrganizationSocials/index.jsx | 10 ++--- .../OrganizationSocials/styles.jsx | 4 +- .../Organization/Orgsocial/index.jsx | 14 +++---- .../Organization/Orgsocial/styles.jsx | 4 +- .../Profile/ConnectSocials/index.jsx | 10 ++--- .../Profile/ConnectSocials/styles.jsx | 4 +- .../Profile/Organizations/index.jsx | 8 ++-- .../Profile/Organizations/styles.jsx | 4 +- .../editProfileDetailsModal.jsx | 38 +++++++++---------- .../Profile/ProfileInfoCard/index.jsx | 14 +++---- .../Profile/SocialIcons/SocialIcons.jsx | 8 ++-- src/components/Profile/ViewProfile/index.jsx | 12 +++--- src/store/actions/profileActions.js | 4 +- src/temp_data/Organizations.json | 2 +- 24 files changed, 112 insertions(+), 112 deletions(-) diff --git a/cypress/e2e/components/organization/organization.cy.js b/cypress/e2e/components/organization/organization.cy.js index c90c4bbe..916e666e 100644 --- a/cypress/e2e/components/organization/organization.cy.js +++ b/cypress/e2e/components/organization/organization.cy.js @@ -90,6 +90,6 @@ describe("Organization Page | CodeLabz", () => { cy.get("[data-testId=facebookButton]").should("exist"); cy.get("[data-testId=githubButton]").should("exist"); cy.get("[data-testId=googleButton]").should("exist"); - cy.get("[data-testId=twitterButton]").should("exist"); + cy.get("[data-testId=xButton]").should("exist"); }); }); diff --git a/cypress/e2e/components/profile/SocialIcons.cy.js b/cypress/e2e/components/profile/SocialIcons.cy.js index 6e70e14b..edf3d8ea 100644 --- a/cypress/e2e/components/profile/SocialIcons.cy.js +++ b/cypress/e2e/components/profile/SocialIcons.cy.js @@ -25,7 +25,7 @@ describe("Social Icons | CodeLabz", () => { cy.get("[data-testId=FacebookIcon]").should("exist"); cy.get("[data-testId=LinkedInIcon]").should("exist"); cy.get("[data-testId=GithubIcon]").should("exist"); - cy.get("[data-testId=TwitterIcon]").should("exist"); + cy.get("[data-testId=XIcon]").should("exist"); cy.get("[data-testId=LinkIcon]").should("exist"); }); }); diff --git a/cypress/e2e/components/profile/user-dashboard.cy.js b/cypress/e2e/components/profile/user-dashboard.cy.js index 18d385d0..b039c9fa 100644 --- a/cypress/e2e/components/profile/user-dashboard.cy.js +++ b/cypress/e2e/components/profile/user-dashboard.cy.js @@ -49,10 +49,10 @@ describe("User Dashboard Test | CodeLabz", () => { .find("div > input") .clear() .type("facebook"); - cy.get("[data-testId=editProfileTwitter]") + cy.get("[data-testId=editProfileX]") .find("div > input") .clear() - .type("twitter"); + .type("x"); cy.get("[data-testId=editProfileLinkedin]") .find("div > input") .clear() diff --git a/src/App.less b/src/App.less index 78d12f07..e6963a0a 100644 --- a/src/App.less +++ b/src/App.less @@ -290,7 +290,7 @@ img { } } -.twitter > span, +.x > span, .google > span, .github > span, .facebook > span { @@ -302,21 +302,21 @@ img { font-size: 16px; } -.twitter, -.twitter:focus:not(:hover) { +.x, +.x:focus:not(:hover) { border-color: #1da1f2; background-color: #1da1f2; } -.twitter-color { +.x-color { color: #1da1f2; } -.twitter:hover { +.x:hover { border-color: #1da1f2; } -.twitter:hover > span { +.x:hover > span { color: #1da1f2; transition: color 0.2s; } diff --git a/src/components/AuthPage/smButton/smButtons.jsx b/src/components/AuthPage/smButton/smButtons.jsx index 226c31f4..dde97a1d 100644 --- a/src/components/AuthPage/smButton/smButtons.jsx +++ b/src/components/AuthPage/smButton/smButtons.jsx @@ -4,7 +4,7 @@ import { useDispatch } from "react-redux"; import { useFirebase } from "react-redux-firebase"; import GoogleImg from "../../../assets/orgs/google.png"; import GitHubIcon from "@mui/icons-material/GitHub"; -import TwitterIcon from "@mui/icons-material/Twitter"; +import XIcon from "@mui/icons-material/X"; import FacebookIcon from "@mui/icons-material/Facebook"; import { signInWithGoogle, signInWithProviderID } from "../../../store/actions"; import useStyles from "./styles"; @@ -50,9 +50,9 @@ const SmButtons = () => { onClick={() => signInWithProviderID("twitter")(firebase, dispatch)} className={classes.button} > - - Twitter - + + X + diff --git a/src/components/AuthPage/smButton/styles.jsx b/src/components/AuthPage/smButton/styles.jsx index 1ba3d92a..e3a034d4 100644 --- a/src/components/AuthPage/smButton/styles.jsx +++ b/src/components/AuthPage/smButton/styles.jsx @@ -18,8 +18,8 @@ const useStyles = makeStyles(theme => ({ fontSize: "42px", color: "#5269a4" }, - tw: { - color: "#7194ef", + x: { + color: "#212121", fontSize: "40px" }, git: { diff --git a/src/components/Forms/UserForm/index.jsx b/src/components/Forms/UserForm/index.jsx index 17d2088e..39de9013 100644 --- a/src/components/Forms/UserForm/index.jsx +++ b/src/components/Forms/UserForm/index.jsx @@ -32,7 +32,7 @@ import { validateOrgWebsite } from "../../../helpers/validations"; import FacebookIcon from "@mui/icons-material/Facebook"; -import TwitterIcon from "@mui/icons-material/Twitter"; +import XIcon from "@mui/icons-material/X"; import LinkedInIcon from "@mui/icons-material/LinkedIn"; import GitHubIcon from "@mui/icons-material/GitHub"; @@ -93,9 +93,9 @@ const UserForm = () => { const [facebookValidateError, setFacebookValidateError] = useState(false); const [facebookValidateErrorMessage, setFacebookValidateErrorMessage] = useState(""); - const [twitter, setTwitter] = useState(getData(profileData.link_twitter)); - const [twitterValidateError, setTwitterValidateError] = useState(false); - const [twitterValidateErrorMessage, setTwitterValidateErrorMessage] = + const [x, setX] = useState(getData(profileData.link_x)); + const [xValidateError, setXValidateError] = useState(false); + const [xValidateErrorMessage, setXValidateErrorMessage] = useState(""); const [linkedin, setLinkedin] = useState(getData(profileData.link_linkedin)); const [linkedinValidateError, setLinkedinValidateError] = useState(false); @@ -124,7 +124,7 @@ const UserForm = () => { const onChangeOrgWebsite = website => setWebsite(website); const onChangeDescription = description => setDescription(description); const onChangeFacebook = facebook => setFacebook(facebook); - const onChangeTwitter = twitter => setTwitter(twitter); + const onChangeX = x => setX(x); const onChangeLinkedin = linkedin => setLinkedin(linkedin); const onChangeGithub = github => setGithub(github); @@ -164,7 +164,7 @@ const UserForm = () => { link_facebook: facebook, link_github: github, link_linkedin: linkedin, - link_twitter: twitter, + link_x: x, description, country })(firebase, firestore, dispatch); @@ -324,23 +324,23 @@ const UserForm = () => { onChangeTwitter(event.target.value)} + data-testId="editProfileX" + onChange={event => onChangeX(event.target.value)} fullWidth autoComplete="handle" style={{ marginBottom: "15px" }} InputProps={{ startAdornment: ( - - Twitter - + + X +

- twitter.com/ + x.com/

) diff --git a/src/components/Forms/UserForm/styles.jsx b/src/components/Forms/UserForm/styles.jsx index 2ab01a4c..cb075f22 100644 --- a/src/components/Forms/UserForm/styles.jsx +++ b/src/components/Forms/UserForm/styles.jsx @@ -33,8 +33,8 @@ const useStyles = makeStyles(theme => ({ fontSize: 24 } }, - tw: { - color: "#03A9F4", + x: { + color: "#212121", fontSize: 30, marginRight: 5, "@media (max-width: 500px)": { diff --git a/src/components/Organization/OrgInfoCard/editOrgDetailsModal.jsx b/src/components/Organization/OrgInfoCard/editOrgDetailsModal.jsx index df241076..d4a0dcf6 100644 --- a/src/components/Organization/OrgInfoCard/editOrgDetailsModal.jsx +++ b/src/components/Organization/OrgInfoCard/editOrgDetailsModal.jsx @@ -11,7 +11,7 @@ import AppsIcon from "@mui/icons-material/Apps"; import LanguageIcon from "@mui/icons-material/Language"; import FacebookIcon from "@mui/icons-material/Facebook"; import LinkedInIcon from "@mui/icons-material/LinkedIn"; -import TwitterIcon from "@mui/icons-material/Twitter"; +import XIcon from "@mui/icons-material/X"; import GitHubIcon from "@mui/icons-material/GitHub"; const EditOrgDetailsModal = ({ currentOrgData, modelCloseCallback }) => { @@ -66,7 +66,7 @@ const EditOrgDetailsModal = ({ currentOrgData, modelCloseCallback }) => { org_link_facebook: currentOrgData.org_link_facebook, org_link_github: currentOrgData.org_link_github, org_link_linkedin: currentOrgData.org_link_linkedin, - org_link_twitter: currentOrgData.org_link_twitter, + org_link_x: currentOrgData.org_link_x, org_description: currentOrgData.org_description, org_country: currentOrgData.org_country }); @@ -168,20 +168,20 @@ const EditOrgDetailsModal = ({ currentOrgData, modelCloseCallback }) => { }} onChange={e => handleChange(e)} >
- + <> - twitter.com/ + x.com/ ) diff --git a/src/components/Organization/OrgInfoCard/orgInfoCard.jsx b/src/components/Organization/OrgInfoCard/orgInfoCard.jsx index 6676c760..3997509b 100644 --- a/src/components/Organization/OrgInfoCard/orgInfoCard.jsx +++ b/src/components/Organization/OrgInfoCard/orgInfoCard.jsx @@ -11,7 +11,7 @@ import ReactCrop from "react-image-crop"; import Divider from "@mui/material/Divider"; import "react-image-crop/dist/ReactCrop.css"; import { BasicImage, NoImage } from "../../../helpers/images"; -import TwitterIcon from "@mui/icons-material/Twitter"; +import XIcon from "@mui/icons-material/X"; import FacebookIcon from "@mui/icons-material/Facebook"; import GitHubIcon from "@mui/icons-material/GitHub"; import LinkedInIcon from "@mui/icons-material/LinkedIn"; @@ -336,17 +336,17 @@ const OrgInfoCard = () => {

)} - {checkAvailable(currentOrgData.org_link_twitter) && ( + {checkAvailable(currentOrgData.org_link_x) && (

- {" "} - {currentOrgData.org_link_twitter} + {" "} + {currentOrgData.org_link_x}

)} diff --git a/src/components/Organization/OrganizationSocials/index.jsx b/src/components/Organization/OrganizationSocials/index.jsx index 73348027..fa287ff5 100644 --- a/src/components/Organization/OrganizationSocials/index.jsx +++ b/src/components/Organization/OrganizationSocials/index.jsx @@ -5,7 +5,7 @@ import CardContent from "@mui/material/CardContent"; import Typography from "@mui/material/Typography"; import GoogleImg from "../../../assets/orgs/google.png"; import GitHubIcon from "@mui/icons-material/GitHub"; -import TwitterIcon from "@mui/icons-material/Twitter"; +import XIcon from "@mui/icons-material/X"; import FacebookIcon from "@mui/icons-material/Facebook"; import useStyles from "./styles"; @@ -57,11 +57,11 @@ const OrganizationSocials = () => { sx={{ padding: { xs: "7px 0px", sm: "7px 5px" } }} data-testId="twitterButton" > - - Twitter - + + X + - Organization Twitter account + Organization X account
diff --git a/src/components/Organization/OrganizationSocials/styles.jsx b/src/components/Organization/OrganizationSocials/styles.jsx index f38ab5c0..bd7c89e3 100644 --- a/src/components/Organization/OrganizationSocials/styles.jsx +++ b/src/components/Organization/OrganizationSocials/styles.jsx @@ -59,8 +59,8 @@ const useStyles = makeStyles(theme => ({ fontSize: 22 } }, - tw: { - color: "#03A9F4", + x: { + color: "#212121", fontSize: 30, marginLeft: 14, marginRight: 5, diff --git a/src/components/Organization/Orgsocial/index.jsx b/src/components/Organization/Orgsocial/index.jsx index 1f9e1d48..66f6a7ff 100644 --- a/src/components/Organization/Orgsocial/index.jsx +++ b/src/components/Organization/Orgsocial/index.jsx @@ -5,7 +5,7 @@ import CardContent from "@mui/material/CardContent"; import Typography from "@mui/material/Typography"; import GoogleImg from "../../../assets/orgs/google.png"; import GitHubIcon from "@mui/icons-material/GitHub"; -import TwitterIcon from "@mui/icons-material/Twitter"; +import XIcon from "@mui/icons-material/X"; import FacebookIcon from "@mui/icons-material/Facebook"; import useStyles from "./styles"; import { signInWithGoogle, signInWithProviderID } from "../../../store/actions"; @@ -100,16 +100,16 @@ const Orgsocial = props => { // onClick={() => signInWithProviderID("twitter")(firebase, dispatch)} onClick={() => props.toOpen - ? openSocialMedialLink(OrgData.org_link_twitter) + ? openSocialMedialLink(OrgData.org_link_x) : console.log("clicked") } - data-testId="twitterButton" + data-testId="xButton" > - - Twitter - + + X + - Organization's Twitter Account + Organization's X Account
diff --git a/src/components/Organization/Orgsocial/styles.jsx b/src/components/Organization/Orgsocial/styles.jsx index 71121118..05b32d78 100644 --- a/src/components/Organization/Orgsocial/styles.jsx +++ b/src/components/Organization/Orgsocial/styles.jsx @@ -77,8 +77,8 @@ const useStyles = makeStyles(theme => ({ fontSize: 24 } }, - tw: { - color: "#03A9F4", + x: { + color: "#212121", fontSize: 30, marginLeft: -3, marginRight: 18, diff --git a/src/components/Profile/ConnectSocials/index.jsx b/src/components/Profile/ConnectSocials/index.jsx index f4af50d3..9cf59510 100644 --- a/src/components/Profile/ConnectSocials/index.jsx +++ b/src/components/Profile/ConnectSocials/index.jsx @@ -5,7 +5,7 @@ import CardContent from "@mui/material/CardContent"; import Typography from "@mui/material/Typography"; import GoogleImg from "../../../assets/orgs/google.png"; import GitHubIcon from "@mui/icons-material/GitHub"; -import TwitterIcon from "@mui/icons-material/Twitter"; +import XIcon from "@mui/icons-material/X"; import FacebookIcon from "@mui/icons-material/Facebook"; import CheckCircleIcon from "@mui/icons-material/CheckCircle"; import useStyles from "./styles"; @@ -101,18 +101,18 @@ const ConnectSocials = () => { data-testId="googleButton" /> linkWithProvider(new firebase.auth.TwitterAuthProvider()) } Icon={ <> - + - Twitter + X } - data-testId="twitterButton" + data-testId="xButton" /> diff --git a/src/components/Profile/ConnectSocials/styles.jsx b/src/components/Profile/ConnectSocials/styles.jsx index 90a5d476..d057cb69 100644 --- a/src/components/Profile/ConnectSocials/styles.jsx +++ b/src/components/Profile/ConnectSocials/styles.jsx @@ -70,8 +70,8 @@ const useStyles = makeStyles(theme => ({ fontSize: 24 } }, - tw: { - color: "#03A9F4", + x: { + color: "#212121", fontSize: 30, marginLeft: -3, marginRight: 18, diff --git a/src/components/Profile/Organizations/index.jsx b/src/components/Profile/Organizations/index.jsx index 6922b803..4917b033 100644 --- a/src/components/Profile/Organizations/index.jsx +++ b/src/components/Profile/Organizations/index.jsx @@ -2,7 +2,7 @@ import React from "react"; import { Card, CardContent, Box, Typography, Button } from "@mui/material"; import GoogleImg from "../../../assets/orgs/google.png"; import GitHubIcon from "@mui/icons-material/GitHub"; -import TwitterIcon from "@mui/icons-material/Twitter"; +import XIcon from "@mui/icons-material/X"; import useStyles from "./styles"; import OrganizationData from "../../../temp_data/Organizations.json"; @@ -24,9 +24,9 @@ const Organizations = () => { Github - - Twitter - + + X + {OrganizationData.map(el => ( diff --git a/src/components/Profile/Organizations/styles.jsx b/src/components/Profile/Organizations/styles.jsx index 02408772..b3f15298 100644 --- a/src/components/Profile/Organizations/styles.jsx +++ b/src/components/Profile/Organizations/styles.jsx @@ -45,8 +45,8 @@ const useStyles = makeStyles(theme => ({ width: "100%" } }, - tw: { - color: "#03A9F4", + x: { + color: "#212121", fontSize: 33, "&:hover": { transform: "scale(1.2)" diff --git a/src/components/Profile/ProfileInfoCard/editProfileDetailsModal.jsx b/src/components/Profile/ProfileInfoCard/editProfileDetailsModal.jsx index 69861a3b..d4d91a36 100644 --- a/src/components/Profile/ProfileInfoCard/editProfileDetailsModal.jsx +++ b/src/components/Profile/ProfileInfoCard/editProfileDetailsModal.jsx @@ -28,7 +28,7 @@ import PersonIcon from "@mui/icons-material/Person"; import PublicIcon from "@mui/icons-material/Public"; import DescriptionIcon from "@mui/icons-material/Description"; import FacebookIcon from "@mui/icons-material/Facebook"; -import TwitterIcon from "@mui/icons-material/Twitter"; +import XIcon from "@mui/icons-material/X"; import LinkedInIcon from "@mui/icons-material/LinkedIn"; import GitHubIcon from "@mui/icons-material/GitHub"; @@ -60,9 +60,9 @@ const EditProfileDetailsModal = ({ profileData, modelCloseCallback }) => { const [facebookValidateError, setFacebookValidateError] = useState(false); const [facebookValidateErrorMessage, setFacebookValidateErrorMessage] = useState(""); - const [twitter, setTwitter] = useState(getData(profileData.link_twitter)); - const [twitterValidateError, setTwitterValidateError] = useState(false); - const [twitterValidateErrorMessage, setTwitterValidateErrorMessage] = + const [x, setX] = useState(getData(profileData.link_X)); + const [xValidateError, setXValidateError] = useState(false); + const [xValidateErrorMessage, setXValidateErrorMessage] = useState(""); const [linkedin, setLinkedin] = useState(getData(profileData.link_linkedin)); const [linkedinValidateError, setLinkedinValidateError] = useState(false); @@ -142,11 +142,11 @@ const EditProfileDetailsModal = ({ profileData, modelCloseCallback }) => { setFacebookValidateErrorMessage, "Please enter a Facebook username" ); - const twitterValid = validateIsEmpty( - twitter, - setTwitterValidateError, - setTwitterValidateErrorMessage, - "Please enter a Twitter username" + const xValid = validateIsEmpty( + x, + setXValidateError, + setXValidateErrorMessage, + "Please enter a X username" ); const linkedinValid = validateIsEmpty( linkedin, @@ -166,7 +166,7 @@ const EditProfileDetailsModal = ({ profileData, modelCloseCallback }) => { orgWebsiteValid && descriptionValid && facebookValid && - twitterValid && + xValid && githubValid && linkedinValid ) { @@ -196,7 +196,7 @@ const EditProfileDetailsModal = ({ profileData, modelCloseCallback }) => { const onChangeOrgWebsite = website => setWebsite(website); const onChangeDescription = description => setDescription(description); const onChangeFacebook = facebook => setFacebook(facebook); - const onChangeTwitter = twitter => setTwitter(twitter); + const onChangeX = x => setX(x); const onChangeLinkedin = linkedin => setLinkedin(linkedin); const onChangeGithub = github => setGithub(github); @@ -333,14 +333,14 @@ const EditProfileDetailsModal = ({ profileData, modelCloseCallback }) => { onChangeTwitter(event.target.value)} - helperText={twitterValidateError ? twitterValidateErrorMessage : null} + data-testId="editProfileX" + onChange={event => onChangeX(event.target.value)} + helperText={xValidateError ? xValidateErrorMessage : null} fullWidth autoComplete="handle" required @@ -348,9 +348,9 @@ const EditProfileDetailsModal = ({ profileData, modelCloseCallback }) => { InputProps={{ startAdornment: ( - +

- twitter.com/ + x.com/

) diff --git a/src/components/Profile/ProfileInfoCard/index.jsx b/src/components/Profile/ProfileInfoCard/index.jsx index bf1cad0b..292dc923 100644 --- a/src/components/Profile/ProfileInfoCard/index.jsx +++ b/src/components/Profile/ProfileInfoCard/index.jsx @@ -16,7 +16,7 @@ import DialogTitle from "@mui/material/DialogTitle"; import Divider from "@mui/material/Divider"; import LinearProgress from "@mui/material/LinearProgress"; import FacebookIcon from "@mui/icons-material/Facebook"; -import TwitterIcon from "@mui/icons-material/Twitter"; +import XIcon from "@mui/icons-material/X"; import GitHubIcon from "@mui/icons-material/GitHub"; import LinkedInIcon from "@mui/icons-material/LinkedIn"; import LinkIcon from "@mui/icons-material/Link"; @@ -47,7 +47,7 @@ const ProfileInfoCard = () => { const [anchorEl, setAnchorEl] = useState(null); const [facebookURI] = useState("https://www.facebook.com/"); - const [twitterURI] = useState("https://twitter.com/"); + const [xURI] = useState("https://x.com/"); const [githubURI] = useState("https://github.com/"); const [linkedinURI] = useState("https://www.linkedin.com/in/"); const [googleURI] = useState("https://www.google.com/search?q="); @@ -365,10 +365,10 @@ const ProfileInfoCard = () => {

)} - {checkAvailable(profileData.link_twitter) && ( + {checkAvailable(profileData.link_x) && (

@@ -378,12 +378,12 @@ const ProfileInfoCard = () => { }} > - {" "} - {profileData.link_twitter} + {profileData.link_x}

diff --git a/src/components/Profile/SocialIcons/SocialIcons.jsx b/src/components/Profile/SocialIcons/SocialIcons.jsx index e0b308c5..cdfd3875 100644 --- a/src/components/Profile/SocialIcons/SocialIcons.jsx +++ b/src/components/Profile/SocialIcons/SocialIcons.jsx @@ -6,7 +6,7 @@ import IconButton from "@mui/material/IconButton"; import FacebookIcon from "@mui/icons-material/Facebook"; import LinkedInIcon from "@mui/icons-material/LinkedIn"; import GitHubIcon from "@mui/icons-material/GitHub"; -import TwitterIcon from "@mui/icons-material/Twitter"; +import XIcon from "@mui/icons-material/X"; import LinkIcon from "@mui/icons-material/Link"; const useStyles = makeStyles(theme => ({ @@ -19,7 +19,7 @@ const useStyles = makeStyles(theme => ({ facebookIcon: { color: "#4267B2" }, - twitterIcon: { + XIcon: { color: "#1DA1F2" }, linkedInIcon: { @@ -55,9 +55,9 @@ export default function SocialIcons(props) { - + diff --git a/src/components/Profile/ViewProfile/index.jsx b/src/components/Profile/ViewProfile/index.jsx index 7dd8fec3..ba8db2a4 100644 --- a/src/components/Profile/ViewProfile/index.jsx +++ b/src/components/Profile/ViewProfile/index.jsx @@ -18,7 +18,7 @@ import Box from "@mui/material/Box"; import { ThemeProvider } from "@mui/material"; import { basicTheme } from "../../../helpers/themes"; import FacebookIcon from "@mui/icons-material/Facebook"; -import TwitterIcon from "@mui/icons-material/Twitter"; +import XIcon from "@mui/icons-material/X"; import GitHubIcon from "@mui/icons-material/GitHub"; import LinkedInIcon from "@mui/icons-material/LinkedIn"; import LinkIcon from "@mui/icons-material/Link"; @@ -189,10 +189,10 @@ const ProfileView = () => {

)} - {checkAvailable(profileData.link_twitter) && ( + {checkAvailable(profileData.link_x) && (

@@ -203,12 +203,12 @@ const ProfileView = () => { }} > - {" "} - {profileData.link_twitter} + {profileData.link_x}

diff --git a/src/store/actions/profileActions.js b/src/store/actions/profileActions.js index c3a96c31..75b254c0 100644 --- a/src/store/actions/profileActions.js +++ b/src/store/actions/profileActions.js @@ -112,7 +112,7 @@ export const updateUserProfile = link_facebook, link_github, link_linkedin, - link_twitter, + link_x, description, country }) => @@ -126,7 +126,7 @@ export const updateUserProfile = link_facebook, link_github, link_linkedin, - link_twitter, + link_x, description, country, updatedAt: firestore.FieldValue.serverTimestamp() diff --git a/src/temp_data/Organizations.json b/src/temp_data/Organizations.json index b2060b5e..75574096 100644 --- a/src/temp_data/Organizations.json +++ b/src/temp_data/Organizations.json @@ -8,7 +8,7 @@ "role": "Admin" }, { - "organization": "Twitter", + "organization": "X", "role": "Contributor" } ] From 2e317a5de35ee407f3ba7049d06155cfc057d332 Mon Sep 17 00:00:00 2001 From: Nourhan hasan Date: Wed, 13 Mar 2024 12:29:46 +0300 Subject: [PATCH 3/3] change Twitter to X --- cypress/e2e/components/profile/user-dashboard.cy.js | 5 +---- src/components/Forms/UserForm/index.jsx | 3 +-- src/components/Organization/OrgInfoCard/orgInfoCard.jsx | 7 ++----- .../Profile/ProfileInfoCard/editProfileDetailsModal.jsx | 3 +-- src/components/Profile/ProfileInfoCard/index.jsx | 5 +---- src/components/Profile/ViewProfile/index.jsx | 5 +---- 6 files changed, 7 insertions(+), 21 deletions(-) diff --git a/cypress/e2e/components/profile/user-dashboard.cy.js b/cypress/e2e/components/profile/user-dashboard.cy.js index b039c9fa..4754c1e2 100644 --- a/cypress/e2e/components/profile/user-dashboard.cy.js +++ b/cypress/e2e/components/profile/user-dashboard.cy.js @@ -49,10 +49,7 @@ describe("User Dashboard Test | CodeLabz", () => { .find("div > input") .clear() .type("facebook"); - cy.get("[data-testId=editProfileX]") - .find("div > input") - .clear() - .type("x"); + cy.get("[data-testId=editProfileX]").find("div > input").clear().type("x"); cy.get("[data-testId=editProfileLinkedin]") .find("div > input") .clear() diff --git a/src/components/Forms/UserForm/index.jsx b/src/components/Forms/UserForm/index.jsx index 39de9013..86adffaa 100644 --- a/src/components/Forms/UserForm/index.jsx +++ b/src/components/Forms/UserForm/index.jsx @@ -95,8 +95,7 @@ const UserForm = () => { useState(""); const [x, setX] = useState(getData(profileData.link_x)); const [xValidateError, setXValidateError] = useState(false); - const [xValidateErrorMessage, setXValidateErrorMessage] = - useState(""); + const [xValidateErrorMessage, setXValidateErrorMessage] = useState(""); const [linkedin, setLinkedin] = useState(getData(profileData.link_linkedin)); const [linkedinValidateError, setLinkedinValidateError] = useState(false); const [linkedinValidateErrorMessage, setLinkedinValidateErrorMessage] = diff --git a/src/components/Organization/OrgInfoCard/orgInfoCard.jsx b/src/components/Organization/OrgInfoCard/orgInfoCard.jsx index 3997509b..fc6e3ac8 100644 --- a/src/components/Organization/OrgInfoCard/orgInfoCard.jsx +++ b/src/components/Organization/OrgInfoCard/orgInfoCard.jsx @@ -339,14 +339,11 @@ const OrgInfoCard = () => { {checkAvailable(currentOrgData.org_link_x) && (

- {" "} - {currentOrgData.org_link_x} + {currentOrgData.org_link_x}

)} diff --git a/src/components/Profile/ProfileInfoCard/editProfileDetailsModal.jsx b/src/components/Profile/ProfileInfoCard/editProfileDetailsModal.jsx index d4d91a36..957a2962 100644 --- a/src/components/Profile/ProfileInfoCard/editProfileDetailsModal.jsx +++ b/src/components/Profile/ProfileInfoCard/editProfileDetailsModal.jsx @@ -62,8 +62,7 @@ const EditProfileDetailsModal = ({ profileData, modelCloseCallback }) => { useState(""); const [x, setX] = useState(getData(profileData.link_X)); const [xValidateError, setXValidateError] = useState(false); - const [xValidateErrorMessage, setXValidateErrorMessage] = - useState(""); + const [xValidateErrorMessage, setXValidateErrorMessage] = useState(""); const [linkedin, setLinkedin] = useState(getData(profileData.link_linkedin)); const [linkedinValidateError, setLinkedinValidateError] = useState(false); const [linkedinValidateErrorMessage, setLinkedinValidateErrorMessage] = diff --git a/src/components/Profile/ProfileInfoCard/index.jsx b/src/components/Profile/ProfileInfoCard/index.jsx index 292dc923..b74277a4 100644 --- a/src/components/Profile/ProfileInfoCard/index.jsx +++ b/src/components/Profile/ProfileInfoCard/index.jsx @@ -378,10 +378,7 @@ const ProfileInfoCard = () => { }} > - {" "} + {" "} {profileData.link_x} diff --git a/src/components/Profile/ViewProfile/index.jsx b/src/components/Profile/ViewProfile/index.jsx index ba8db2a4..5957b189 100644 --- a/src/components/Profile/ViewProfile/index.jsx +++ b/src/components/Profile/ViewProfile/index.jsx @@ -203,10 +203,7 @@ const ProfileView = () => { }} > - {" "} + {" "} {profileData.link_x}