Skip to content

Commit

Permalink
finished
Browse files Browse the repository at this point in the history
  • Loading branch information
KaharErbol committed Apr 4, 2023
1 parent 60c0b39 commit ab89b92
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion ghi/app/src/AppointmentForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function AppoinementForm(){

const response = await fetch(url, fetchConfig);
if (response.ok) {
setTechnicians([]);
// setTechnicians([]);
setCustomerName('');
setVin('');
setDate('');
Expand Down
2 changes: 1 addition & 1 deletion ghi/app/src/AutomobileForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function AutomobileForm() {

const response = await fetch(url, fetchConfig);
if (response.ok) {
setModels([]);
// setModels([]);
setColor('');
setYear('');
setVin('');
Expand Down
24 changes: 15 additions & 9 deletions ghi/app/src/MainPage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useState, useEffect } from "react";
import { NavLink } from "react-router-dom";

function MainPage() {

Expand Down Expand Up @@ -39,19 +38,26 @@ function MainPage() {
Vintage Car Service and Sales
</p>
<img src={backImg} className="img-fluid" alt="Backgrounf Image"/>
<h2>Latest Collections</h2>
</div>
<div className="row row-cols-1 row-cols-md-2 g-4">
<div className="col">
<div className="container text-center">
<div className="row row-cols-3">
{pics.slice(-4).map(pic => {
return (
<div key={pic.id} className="col-sm-6">
<div className="card" >
<img src="..." className="card-img-top" alt="..." />
<div className="card-body">
<h5 className="card-title">Card title</h5>
<p className="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" className="btn btn-primary">Go somewhere</a>
<img src={pic.picture_url} className="card-img-top card-img-custom" alt="..." style={{height: "400px", objectFit: "cover"}}/>
<div className="card-body">
<h5 className="card-title">{pic.name}</h5>
<p className="card-text">Manufacturer: {pic.manufacturer.name}</p>
<a href="#" className="btn btn-primary">Go somewhere</a>
</div>
</div>
</div>
</div>
);
})}
</div>
</div>
</div>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion ghi/app/src/ModelForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function ModelForm() {

const response = await fetch(modelsUrl, fetchConfig);
if (response.ok) {
setManufacturers([]);
// setManufacturers([]);
setModelName('');
setPictureUrl('');
}
Expand Down

0 comments on commit ab89b92

Please sign in to comment.