File tree Expand file tree Collapse file tree 5 files changed +37
-20
lines changed
Expand file tree Collapse file tree 5 files changed +37
-20
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,10 @@ interface GetVehiclesPayload extends ActionPayload {
2525 email ?: string ;
2626}
2727
28- export const registerVehicleAction = ( { callback, accessToken } : ActionPayload ) => {
28+ export const registerVehicleAction = ( {
29+ callback,
30+ accessToken,
31+ } : ActionPayload ) => {
2932 return {
3033 type : actionTypes . REGISTER_VEHICLE ,
3134 payload : {
Original file line number Diff line number Diff line change @@ -203,18 +203,17 @@ const Dashboard: React.FC<DashboardProps> = ({
203203 className = "dashboard-header"
204204 title = "Vehicles Details"
205205 extra = { [
206- < Button
207- type = "primary"
208- shape = "round"
209- icon = { < PlusOutlined /> }
210- size = "large"
211- onClick = { handleVerifyVehicleClick }
212- key = "verify-vehicle"
213- >
214- Add Vehicle
215- </ Button > ,
216- ]
217- }
206+ < Button
207+ type = "primary"
208+ shape = "round"
209+ icon = { < PlusOutlined /> }
210+ size = "large"
211+ onClick = { handleVerifyVehicleClick }
212+ key = "verify-vehicle"
213+ >
214+ Add Vehicle
215+ </ Button > ,
216+ ] }
218217 />
219218 < Content >
220219 < Row gutter = { [ 40 , 40 ] } >
Original file line number Diff line number Diff line change @@ -60,7 +60,9 @@ const VerifyVehicle: React.FC<VerifyVehicleProps> = ({
6060 loading = { vehicleRegistered === 1 }
6161 className = "form-button"
6262 >
63- { vehicleRegistered === 2 ? "Vehicle Registered" : "Register Your New Vehicle" }
63+ { vehicleRegistered === 2
64+ ? "Vehicle Registered"
65+ : "Register Your New Vehicle" }
6466 </ Button >
6567 { registrationMessage && (
6668 < Alert
@@ -74,7 +76,7 @@ const VerifyVehicle: React.FC<VerifyVehicleProps> = ({
7476 </ Card >
7577 </ Col >
7678 ) }
77-
79+
7880 < Col xs = { 24 } md = { vehicles . length ? 11 : 20 } >
7981 < Card
8082 title = "Verify Vehicle Details"
@@ -112,8 +114,14 @@ const VerifyVehicle: React.FC<VerifyVehicleProps> = ({
112114 < Input placeholder = "Vehicle No." />
113115 </ Form . Item >
114116 < Form . Item wrapperCol = { { sm : { span : 24 } } } >
115- { hasErrored && < div className = "error-message" > { errorMessage } </ div > }
116- < Button type = "primary" htmlType = "submit" className = "form-button" >
117+ { hasErrored && (
118+ < div className = "error-message" > { errorMessage } </ div >
119+ ) }
120+ < Button
121+ type = "primary"
122+ htmlType = "submit"
123+ className = "form-button"
124+ >
117125 Verify Vehicle Details
118126 </ Button >
119127 </ Form . Item >
Original file line number Diff line number Diff line change @@ -100,7 +100,8 @@ export const EMAIL_NOT_CHANGED: string = "Could not change email id";
100100export const NO_SERVICES : string = "Could not get mechanic details" ;
101101export const EMAIL_NOT_SENT : string = "Could not resend mail" ;
102102export const VEHICLE_NOT_ADDED : string = "Internal Server error! Wrong VIN!" ;
103- export const VEHICLE_NOT_REGISTERED : string = "Could not register vehicle. Try again!" ;
103+ export const VEHICLE_NOT_REGISTERED : string =
104+ "Could not register vehicle. Try again!" ;
104105export const NO_VEHICLES : string = "Could not get vehicles" ;
105106export const NO_MECHANICS : string = "Could not get mechanic details" ;
106107export const SERVICE_REQUEST_SENT : string =
Original file line number Diff line number Diff line change @@ -18,7 +18,10 @@ import React from "react";
1818import PropTypes from "prop-types" ;
1919import { connect } from "react-redux" ;
2020import { Modal } from "antd" ;
21- import { registerVehicleAction , verifyVehicleAction } from "../../actions/vehicleActions" ;
21+ import {
22+ registerVehicleAction ,
23+ verifyVehicleAction ,
24+ } from "../../actions/vehicleActions" ;
2225import VerifyVehicle from "../../components/verifyVehicle/verifyVehicle" ;
2326import responseTypes from "../../constants/responseTypes" ;
2427import { SUCCESS_MESSAGE } from "../../constants/messages" ;
@@ -81,7 +84,10 @@ const VerifyVehicleContainer = (props) => {
8184 ) ;
8285} ;
8386
84- const mapStateToProps = ( { userReducer : { accessToken } , vehicleReducer : { vehicles } } ) => {
87+ const mapStateToProps = ( {
88+ userReducer : { accessToken } ,
89+ vehicleReducer : { vehicles } ,
90+ } ) => {
8591 return { accessToken, vehicles } ;
8692} ;
8793
You can’t perform that action at this time.
0 commit comments