EF17 So Many Addresses

This commit is contained in:
DavidBelisle
2022-11-11 17:04:46 -05:00
parent 980cb1ab53
commit 73421ea1ef
5 changed files with 277 additions and 3 deletions

View File

@@ -0,0 +1,31 @@
import { useState } from 'react';
import { faTimes } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
const Address = ({ address, onDelete }) => {
return (
<div className="inventaire-item">
<div className='simple-item-top-container'>
<h3 className='simple-item-title' >
{address.civicNumber} {address.street}
</h3>
<h1 className='simple-item-buttons'>
<FontAwesomeIcon icon={faTimes} className='.btn-effacer-morceau' style={{ color: "red", cursor: 'pointer' }}
onClick={() => onDelete(address)} />
</h1>
</div>
{address.appartment != null ?
<h5>
App: {address.appartment}
</h5>
:
null
}
<div>
<p> {address.city}, {address.province}, {address.country}, {address.postalCode}</p>
</div>
</div>
)
}
export default Address;

View File

@@ -17,6 +17,7 @@ import React from 'react';
import Invoices from "../pages/Invoices";
import Cookies from "universal-cookie";
import ReviewInvoice from "../pages/ReviewInvoice";
import MyAddresses from "../pages/MyAddresses";
const App = () => {
const cookies = new Cookies();
@@ -53,6 +54,7 @@ const App = () => {
<Route path="myinvoices" element={<MyInvoices />} />
<Route path="invoices" element={<Invoices />} />
<Route path="reviewinvoice" element={<ReviewInvoice />} />
<Route path="myaddresses" element={<MyAddresses />} />
</Route>
</Routes>
</BrowserRouter>