Skip to content

Commit 88ba927

Browse files
committed
lint fix
1 parent 4ebcbc6 commit 88ba927

File tree

4 files changed

+28
-21
lines changed

4 files changed

+28
-21
lines changed

services/web/src/components/signup/signup.tsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,22 @@ const Signup: React.FC<SignupProps> = ({
6767
return (
6868
<div className="container">
6969
<Card title="Sign Up" bordered={false} className="form-card">
70-
<div className="user-type-toggle">
71-
<button
72-
type="button"
73-
className={`toggle-button ${userType === "user" ? "active" : ""}`}
74-
onClick={() => handleUserTypeChange("user")}
75-
>
76-
User
77-
</button>
78-
<button
79-
type="button"
80-
className={`toggle-button ${userType === "mechanic" ? "active" : ""}`}
81-
onClick={() => handleUserTypeChange("mechanic")}
82-
>
83-
Mechanic
84-
</button>
85-
</div>
70+
<div className="user-type-toggle">
71+
<button
72+
type="button"
73+
className={`toggle-button ${userType === "user" ? "active" : ""}`}
74+
onClick={() => handleUserTypeChange("user")}
75+
>
76+
User
77+
</button>
78+
<button
79+
type="button"
80+
className={`toggle-button ${userType === "mechanic" ? "active" : ""}`}
81+
onClick={() => handleUserTypeChange("mechanic")}
82+
>
83+
Mechanic
84+
</button>
85+
</div>
8686
<Form
8787
name="basic"
8888
initialValues={{

services/web/src/constants/messages.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export const EMAIL_REQUIRED: string = "Please enter a valid email!";
2121
export const PHONE_NO_REQUIRED: string = "Please enter phone number";
2222
export const INVALID_PHONE: string =
2323
"Contact number should only contain digits, (, ), + or spaces.";
24-
export const MECHANIC_CODE_REQUIRED: string = "Please enter a valid mechanic code starting with 'MECH_'!";
24+
export const MECHANIC_CODE_REQUIRED: string =
25+
"Please enter a valid mechanic code starting with 'MECH_'!";
2526
export const PASSWORD_REQUIRED: string = "Please enter your password";
2627
export const INVALID_PASSWORD: React.ReactElement = React.createElement(
2728
"span",

services/web/src/containers/signup/signup.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ import { connect } from "react-redux";
2020
import { useNavigate } from "react-router-dom";
2121
import Signup from "../../components/signup/signup";
2222

23-
import { signUpUserAction, signUpMechanicAction } from "../../actions/userActions";
23+
import {
24+
signUpUserAction,
25+
signUpMechanicAction,
26+
} from "../../actions/userActions";
2427
import responseTypes from "../../constants/responseTypes";
2528
import { SUCCESS_MESSAGE } from "../../constants/messages";
2629

services/web/src/sagas/userSaga.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ export function* signUp(action: MyAction): Generator<any, void, any> {
269269
* @payload {Function} payload.callback - Callback method
270270
*/
271271
export function* signUpMechanic(action: MyAction): Generator<any, void, any> {
272-
const { name, email, number, mechanic_code, password, callback } = action.payload;
272+
const { name, email, number, mechanic_code, password, callback } =
273+
action.payload;
273274
let receivedResponse: Partial<Response> = {};
274275
try {
275276
yield put({ type: actionTypes.FETCHING_DATA });
@@ -297,8 +298,10 @@ export function* signUpMechanic(action: MyAction): Generator<any, void, any> {
297298
});
298299

299300
yield put({ type: actionTypes.FETCHED_DATA, payload: receivedResponse });
300-
if (receivedResponse.ok) callback(responseTypes.SUCCESS, responseJSON.message);
301-
else callback(responseTypes.FAILURE, responseJSON.message || SIGN_UP_FAILED);
301+
if (receivedResponse.ok)
302+
callback(responseTypes.SUCCESS, responseJSON.message);
303+
else
304+
callback(responseTypes.FAILURE, responseJSON.message || SIGN_UP_FAILED);
302305
} catch (e) {
303306
yield put({ type: actionTypes.FETCHED_DATA, payload: receivedResponse });
304307
callback(responseTypes.FAILURE, SIGN_UP_FAILED);

0 commit comments

Comments
 (0)