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

Change twitter to x #123

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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 cypress/e2e/components/organization/organization.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
});
});
2 changes: 1 addition & 1 deletion cypress/e2e/components/profile/SocialIcons.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
});
});
5 changes: 1 addition & 4 deletions cypress/e2e/components/profile/user-dashboard.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ describe("User Dashboard Test | CodeLabz", () => {
.find("div > input")
.clear()
.type("facebook");
cy.get("[data-testId=editProfileTwitter]")
.find("div > input")
.clear()
.type("twitter");
cy.get("[data-testId=editProfileX]").find("div > input").clear().type("x");
cy.get("[data-testId=editProfileLinkedin]")
.find("div > input")
.clear()
Expand Down
12 changes: 6 additions & 6 deletions src/App.less
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ img {
}
}

.twitter > span,
.x > span,
.google > span,
.github > span,
.facebook > span {
Expand All @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions src/components/AuthPage/smButton/smButtons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -50,9 +50,9 @@ const SmButtons = () => {
onClick={() => signInWithProviderID("twitter")(firebase, dispatch)}
className={classes.button}
>
<TwitterIcon className={classes.tw}>
<span className="sm-text">Twitter</span>
</TwitterIcon>
<XIcon className={classes.x}>
<span className="sm-text">X</span>
</XIcon>
</IconButton>
</Grid>
<Grid item>
Expand Down
4 changes: 2 additions & 2 deletions src/components/AuthPage/smButton/styles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const useStyles = makeStyles(theme => ({
fontSize: "42px",
color: "#5269a4"
},
tw: {
color: "#7194ef",
x: {
color: "#212121",
fontSize: "40px"
},
git: {
Expand Down
29 changes: 14 additions & 15 deletions src/components/Forms/UserForm/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -93,10 +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] =
useState("");
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);
const [linkedinValidateErrorMessage, setLinkedinValidateErrorMessage] =
Expand Down Expand Up @@ -124,7 +123,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);

Expand Down Expand Up @@ -164,7 +163,7 @@ const UserForm = () => {
link_facebook: facebook,
link_github: github,
link_linkedin: linkedin,
link_twitter: twitter,
link_x: x,
description,
country
})(firebase, firestore, dispatch);
Expand Down Expand Up @@ -324,23 +323,23 @@ const UserForm = () => {
</Box>
<Box style={{ marginTop: 15 }}>
<TextField
label="Twitter"
label="X"
variant="outlined"
value={twitter}
value={x}
placeholder="username"
data-testId="editProfileTwitter"
onChange={event => onChangeTwitter(event.target.value)}
data-testId="editProfileX"
onChange={event => onChangeX(event.target.value)}
fullWidth
autoComplete="handle"
style={{ marginBottom: "15px" }}
InputProps={{
startAdornment: (
<InputAdornment position="start" style={{ padding: "25px 0" }}>
<TwitterIcon className={classes.tw}>
<span className="sm-text">Twitter</span>
</TwitterIcon>
<XIcon className={classes.x}>
<span className="sm-text">X</span>
</XIcon>
<p style={{ margin: "15px 0px 15px 8px", color: "grey" }}>
twitter.com/
x.com/
</p>
</InputAdornment>
)
Expand Down
4 changes: 2 additions & 2 deletions src/components/Forms/UserForm/styles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const useStyles = makeStyles(theme => ({
fontSize: 24
}
},
tw: {
color: "#03A9F4",
x: {
color: "#212121",
fontSize: 30,
marginRight: 5,
"@media (max-width: 500px)": {
Expand Down
14 changes: 7 additions & 7 deletions src/components/Organization/OrgInfoCard/editOrgDetailsModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand Down Expand Up @@ -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
});
Expand Down Expand Up @@ -168,20 +168,20 @@ const EditOrgDetailsModal = ({ currentOrgData, modelCloseCallback }) => {
}}
onChange={e => handleChange(e)}
></TextField>
<label className="form-label">Organization Twitter account</label>
<label className="form-label">Organization X account</label>
<TextField
variant="outlined"
placeholder="Twitter handle (without @)"
placeholder="X handle (without @)"
autoComplete="none"
fullWidth
style={{ marginBottom: "1.5rem" }}
name="org_link_twitter"
defaultValue={formValue.org_link_twitter}
name="org_link_x"
defaultValue={formValue.org_link_x}
InputProps={{
startAdornment: (
<InputAdornment position="start">
<>
<TwitterIcon className="twitter-color mr-4" /> twitter.com/
<XIcon className="x-color mr-4" /> x.com/
</>
</InputAdornment>
)
Expand Down
11 changes: 4 additions & 7 deletions src/components/Organization/OrgInfoCard/orgInfoCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -336,17 +336,14 @@ const OrgInfoCard = () => {
</a>
</p>
)}
{checkAvailable(currentOrgData.org_link_twitter) && (
{checkAvailable(currentOrgData.org_link_x) && (
<p>
<a
href={
"https://twitter.com/" + currentOrgData.org_link_twitter
}
href={"https://x.com/" + currentOrgData.org_link_x}
target="_blank"
rel="noopener noreferrer"
>
<TwitterIcon className="twitter-color" />{" "}
{currentOrgData.org_link_twitter}
<XIcon className="x-color" /> {currentOrgData.org_link_x}
</a>
</p>
)}
Expand Down
10 changes: 5 additions & 5 deletions src/components/Organization/OrganizationSocials/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -57,11 +57,11 @@ const OrganizationSocials = () => {
sx={{ padding: { xs: "7px 0px", sm: "7px 5px" } }}
data-testId="twitterButton"
>
<TwitterIcon className={classes.tw}>
<span className="sm-text">Twitter</span>
</TwitterIcon>
<XIcon className={classes.x}>
<span className="sm-text">X</span>
</XIcon>
<Typography className={classes.text}>
Organization Twitter account
Organization X account
</Typography>
</Box>
</Box>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Organization/OrganizationSocials/styles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ const useStyles = makeStyles(theme => ({
fontSize: 22
}
},
tw: {
color: "#03A9F4",
x: {
color: "#212121",
fontSize: 30,
marginLeft: 14,
marginRight: 5,
Expand Down
14 changes: 7 additions & 7 deletions src/components/Organization/Orgsocial/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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"
>
<TwitterIcon className={classes.tw}>
<span className="sm-text">Twitter</span>
</TwitterIcon>
<XIcon className={classes.x}>
<span className="sm-text">X</span>
</XIcon>
<Typography className={classes.text}>
Organization's Twitter Account
Organization's X Account
</Typography>
</Grid>
</Box>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Organization/Orgsocial/styles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ const useStyles = makeStyles(theme => ({
fontSize: 24
}
},
tw: {
color: "#03A9F4",
x: {
color: "#212121",
fontSize: 30,
marginLeft: -3,
marginRight: 18,
Expand Down
10 changes: 5 additions & 5 deletions src/components/Profile/ConnectSocials/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -101,18 +101,18 @@ const ConnectSocials = () => {
data-testId="googleButton"
/>
<SocialButton
isLinked={isProviderLinked("twitter")}
isLinked={isProviderLinked("x")}
onClick={() =>
linkWithProvider(new firebase.auth.TwitterAuthProvider())
}
Icon={
<>
<TwitterIcon className={classes.tw}></TwitterIcon>
<XIcon className={classes.x}></XIcon>

<span className={classes.text}>Twitter</span>
<span className={classes.text}>X</span>
</>
}
data-testId="twitterButton"
data-testId="xButton"
/>
</Box>
</CardContent>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Profile/ConnectSocials/styles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ const useStyles = makeStyles(theme => ({
fontSize: 24
}
},
tw: {
color: "#03A9F4",
x: {
color: "#212121",
fontSize: 30,
marginLeft: -3,
marginRight: 18,
Expand Down
8 changes: 4 additions & 4 deletions src/components/Profile/Organizations/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -24,9 +24,9 @@ const Organizations = () => {
<GitHubIcon className={classes.git}>
<span className="sm-text">Github</span>
</GitHubIcon>
<TwitterIcon className={classes.tw}>
<span className="sm-text">Twitter</span>
</TwitterIcon>
<XIcon className={classes.x}>
<span className="sm-text">X</span>
</XIcon>
</Box>
<Box className={classes.organizations} style={{ margin: "1px 0" }}>
{OrganizationData.map(el => (
Expand Down
Loading