EF17 So Many Addresses
This commit is contained in:
@@ -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;
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user