config changes
This commit is contained in:
@@ -30,7 +30,6 @@ 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,
|
||||||
@@ -95,7 +94,6 @@ 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);
|
||||||
|
|||||||
24
src/index.js
24
src/index.js
@@ -1,18 +1,8 @@
|
|||||||
import React from 'react';
|
import React from "react";
|
||||||
import ReactDOM from 'react-dom/client';
|
import ReactDOM from "react-dom/client";
|
||||||
import './index.css';
|
import "./index.css";
|
||||||
import App from './App';
|
import App from "./App";
|
||||||
import reportWebVitals from './reportWebVitals';
|
import reportWebVitals from "./reportWebVitals";
|
||||||
|
|
||||||
|
const root = ReactDOM.createRoot(document.getElementById("root"));
|
||||||
const root = ReactDOM.createRoot(document.getElementById('root'));
|
root.render(<App />);
|
||||||
root.render(
|
|
||||||
<React.StrictMode>
|
|
||||||
<App />
|
|
||||||
</React.StrictMode>
|
|
||||||
);
|
|
||||||
|
|
||||||
// If you want to start measuring performance in your app, pass a function
|
|
||||||
// to log results (for example: reportWebVitals(console.log))
|
|
||||||
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
|
||||||
reportWebVitals();
|
|
||||||
|
|||||||
Reference in New Issue
Block a user