Skip to content

Commit

Permalink
Merge pull request #20 from spknetwork/improve-onboard-mobile-styles
Browse files Browse the repository at this point in the history
fixed mobile styles
  • Loading branch information
igormuba authored Mar 21, 2024
2 parents 7db575e + 9cf0d55 commit d75ca47
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 17 deletions.
17 changes: 15 additions & 2 deletions src/common/components/onboard-friend/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
padding: 2rem;
border-radius: 1rem;
color: $steel-grey;
word-break: break-all
word-break: break-all;

@media (max-width: 470px) {
width: 90%;
margin-top: 100px;
}
}

.friend-details{
Expand Down Expand Up @@ -54,4 +59,12 @@
color: rgb(175, 221, 50);
animation: blink 2s infinite;
}


.operation-amount{
display: flex;
margin-top: 3px;

@media (max-width: 470px) {
flex-wrap: wrap;
}
}
14 changes: 6 additions & 8 deletions src/common/components/onboard-friend/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const OnboardFriend = (props: Props | any) => {
const [step, setStep] = useState("confirm");
const [msg, setMsg] = useState("");
const [token, setToken] = useState(0)
const [rcAmount, setRcAmount] = useState(5)
const [rcAmount, setRcAmount] = useState(30)
const [isChecked, setChecked] = useState(true);
const [commentAmount, setCommentAmount] = useState(0);
const [voteAmount, setVoteAmount] = useState(0);
Expand Down Expand Up @@ -229,12 +229,11 @@ const OnboardFriend = (props: Props | any) => {
...props,
})
: NavBar({ ...props })}
<div className={`${containerClasses} mt-5`}>
{ !activeUser ? <div>
{<>
<div className="onboard">
<div className={`${containerClasses} d-flex align-items-center justify-content-center mt-5`}>
{ !activeUser ? <div className="d-flex justify-content-center">
<div className="onboard w-100">
{step=== "confirm" && <>
<h5>{_t("onboard.creating-for-a-friend")}</h5>
<h5 className="text-center">{_t("onboard.creating-for-a-friend")}</h5>
<div className="friend-details">
{urlInfo && (
<div className="friend-details">
Expand Down Expand Up @@ -309,7 +308,6 @@ const OnboardFriend = (props: Props | any) => {
<Button onClick={()=> setStep("confirm")}>{_t("onboard.try-again")}</Button>
</>}
</div>
</>}
</div> :
<div className="onboard">
{step=== "confirm" && <>
Expand Down Expand Up @@ -350,7 +348,7 @@ const OnboardFriend = (props: Props | any) => {
onChange={(e: any) => setRcAmount(Number(e.target.value))}
/>
</InputGroup>
<div className="operation-amount d-flex mt-3">
<div className="operation-amount">
<span className="operations">Posts/Comment: {commentAmount} |</span>
<span className="operations">Votes: {voteAmount} |</span>
<span className="operations">Transfers: {transferAmount} |</span>
Expand Down
3 changes: 2 additions & 1 deletion src/common/i18n/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,11 @@
"learn-more": "Learn more about benefits in our <a href=\"https://starterkit.tech/faqs#how-to-join\">FAQ</a>",
"username": "Pick a username",
"email": "Enter your email address",
"ref": "Referred user (optional)",
"referral": "Enter your referral/account creator",
"submit": "Continue",
"validation-username": "Username is required.",
"validation-email": "Email is required.",
"validation-referral": "Referral is required.",
"success": "We've sent an email to {{email}}.",
"success-2": "Follow instructions to complete signup process.",
"login-text-1": "Do you have an account?",
Expand Down
25 changes: 22 additions & 3 deletions src/common/pages/_sign-up.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
align-items: center;
margin: auto;

@media (max-width: $md-break) {
@media (max-width: 470px) {
flex-direction: column;
align-items: center;
}
Expand All @@ -28,6 +28,12 @@
border-radius: 1rem;
color: $steel-grey;
word-break: break-all;
// background-color: red;

@media (max-width: 470px) {
margin-top: 100px;
width: 100%;
}

.account-details{
display: flex;
Expand Down Expand Up @@ -193,11 +199,16 @@
}
}

.wrapper{
.signup-wrapper{
display: flex;
justify-self: center;
align-items: center;
width: 100%;

@media (max-width: 470px) {
flex-direction: column;
align-items: center;
}

.account-types{
flex: 1;
Expand All @@ -224,6 +235,10 @@
padding: 10px;
cursor: pointer;

@media (max-width: 470px) {
width: 300px;
}

span{
font-size: 18px;
font-weight: bold;
Expand All @@ -238,9 +253,13 @@
}

.link-wrap{
// background-color: red;
display: flex;
align-items: center;
flex-direction: row;
gap: 30px;

@media (max-width: 470px) {
flex-direction: column;
align-items: center;
}
}
6 changes: 3 additions & 3 deletions src/common/pages/sign-up.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ const SignUpPage = (props: Props | any) => {
...props,
})
: NavBar({ ...props })}
<div className={`sign-up-page-container ${containerClasses}`}>
<div className="wrapper">
<div className={`sign-up-page ${containerClasses}`}>
<div className="signup-wrapper">
{step === 1 && <div className="account-types align-self-center d-flex">
<h3>Sign up with</h3>
<div
Expand Down Expand Up @@ -281,7 +281,7 @@ const SignUpPage = (props: Props | any) => {
onChange={emailChanged}
required={true}
onInvalid={(e: any) =>
handleInvalid(e, "sign-up.", "validation-username")
handleInvalid(e, "sign-up.", "validation-email")
}
onInput={handleOnInput}
/>
Expand Down

0 comments on commit d75ca47

Please sign in to comment.