Skip to content

Commit

Permalink
[#1584] Redesign onboarding page by using NewLayout
Browse files Browse the repository at this point in the history
  • Loading branch information
ifirmawan committed Sep 4, 2023
1 parent d941ccf commit b3c19cd
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
2 changes: 2 additions & 0 deletions frontend/src/modules/onboarding/affiliation-option.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function AffiliationOption({ handleAffiliationChange, next }) {
handleAffiliationChange(false);
next();
}}
className="small"
>
Yes
</Button>
Expand All @@ -25,6 +26,7 @@ function AffiliationOption({ handleAffiliationChange, next }) {
handleAffiliationChange(true);
next(1);
}}
className="small"
>
No
</Button>
Expand Down
9 changes: 4 additions & 5 deletions frontend/src/modules/onboarding/form-four.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
UploadOutlined,
} from "@ant-design/icons";
import { Field } from "react-final-form";
import FormLabel from "../../components/form-label";

function FormFour({ validate }) {
return (
Expand All @@ -31,11 +32,9 @@ function FormFour({ validate }) {
<Field name="about" validate={validate}>
{({ input, meta }) => (
<div className="field-wrapper">
<div class="ant-col ant-form-item-label">
<label for="about" class="" title="">
Short Bio
</label>
</div>
<FormLabel for="about" meta={meta}>
Short Bio
</FormLabel>
<TextArea
onChange={(e) => input.onChange(e.target.value)}
placeholder="Max 500 letters"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/modules/onboarding/form-three.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function FormThree({
};
return (
<>
<div style={{ marginTop: 20, color: "#A5B0C9" }}>
<div className="label-text">
Can't see what you're looking for?
</div>
<Select
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/modules/onboarding/form-two.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function FormTwo({
};
return (
<>
<div style={{ marginTop: 20, color: "#A5B0C9" }}>
<div className="label-text">
Can't see what you're looking for?
</div>
<Select
Expand Down
14 changes: 8 additions & 6 deletions frontend/src/modules/onboarding/view.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useRef, useEffect, notification } from "react";
import styles from "./styles.module.scss";
import { Button, Typography, Steps } from "antd";
import { Typography, Steps } from "antd";
import { Form } from "react-final-form";
import AffiliationOption from "./affiliation-option";
import FormOne from "./form-one";
Expand All @@ -13,6 +13,7 @@ import api from "../../utils/api";
import { setIn } from "final-form";
import { useRouter } from "next/router";
import { useDeviceSize } from "../landing/landing";
import Button from "../../components/button"

function Authentication() {
const formRef = useRef();
Expand Down Expand Up @@ -283,8 +284,8 @@ function Authentication() {
/>
</div>
<div className="button-bottom-panel">
<Button className="step-button-next" onClick={() => next()}>
Next {">"}
<Button className="step-button-next" onClick={() => next()} ghost>
Next
</Button>
</div>
</div>
Expand Down Expand Up @@ -329,15 +330,16 @@ function Authentication() {
/>
{currentStep > 0 && (
<Button className="step-button-back" onClick={previous}>
{"<"} Back
Back
</Button>
)}
{currentStep < 5 && currentStep > 1 && (
<Button
className="step-button-next abs"
onClick={() => next()}
withArrow="link"
>
Next {">"}
Next
</Button>
)}
{currentStep === 5 && (
Expand All @@ -346,7 +348,7 @@ function Authentication() {
onClick={handleSubmit}
loading={loading}
>
Submit {">"}
Submit
</Button>
)}
</div>
Expand Down

0 comments on commit b3c19cd

Please # to comment.