additional styling
This commit is contained in:
@@ -30,6 +30,7 @@ const Vehicles = () => {
|
|||||||
const handleIdInput = (e) => setVehId(e.target.value);
|
const handleIdInput = (e) => setVehId(e.target.value);
|
||||||
|
|
||||||
const handleChange = (e) => {
|
const handleChange = (e) => {
|
||||||
|
console.log(e);
|
||||||
setInputs((prevState) => ({
|
setInputs((prevState) => ({
|
||||||
...prevState,
|
...prevState,
|
||||||
[e.target.name]: e.target.value,
|
[e.target.name]: e.target.value,
|
||||||
@@ -51,7 +52,7 @@ const Vehicles = () => {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const formatMiles = parseFloat(inputs.mileage.replace(/,/g, ""));
|
const formatMiles = parseFloat(inputs.mileage.replace(/,/g, ""));
|
||||||
const formatPrice = parseFloat(inputs.price.replace(/,/g, "") * 100);
|
const formatPrice = parseFloat(inputs.price.replace(/,/g, "") * 100);
|
||||||
inputs.mileage = formatMiles;
|
inputs.Mileage = formatMiles;
|
||||||
inputs.price = formatPrice;
|
inputs.price = formatPrice;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -93,7 +94,8 @@ const Vehicles = () => {
|
|||||||
|
|
||||||
async function addData(e) {
|
async function addData(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
format(e);
|
//format(e);
|
||||||
|
console.log("inpiuts", inputs);
|
||||||
setSavedVehicles([...savedVehicles, inputs]);
|
setSavedVehicles([...savedVehicles, inputs]);
|
||||||
try {
|
try {
|
||||||
const docRef = await addDoc(collection(db, "hdepot"), inputs);
|
const docRef = await addDoc(collection(db, "hdepot"), inputs);
|
||||||
|
|||||||
@@ -127,7 +127,11 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.deleteButtonBox {
|
.deleteButtonBox {
|
||||||
margin: 15px 0px 20px 0px;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin: 15px auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inputContainer {
|
.inputContainer {
|
||||||
|
|||||||
Reference in New Issue
Block a user