diff --git a/frontend/src/app/reports/Dashboard.tsx b/frontend/src/app/reports/Dashboard.tsx index 91c92d6..e425d1e 100644 --- a/frontend/src/app/reports/Dashboard.tsx +++ b/frontend/src/app/reports/Dashboard.tsx @@ -199,50 +199,7 @@ export default function Dashboard() { const [previousOrderData, setPreviousOrderData] = useState< any[]>([]); - function getSelectedLocation(){ - return selectedLocation; - } - - - function fetchAllOrders(){ - //location="65d91d857b2e523b16d35778"; - //const [orderData, setOrderData] = useState([]); - //co nsole.log(API_BASE_URL+"/order/all"); - fetch(API_BASE_URL+"/orders/all") - .then(response => response.json()) - .then(orderData => setOrderData(orderData)); - return orderData; - } - - - function fetchOrderByLocation(location:string){ - location = location.split(' ').join(''); - //location="65d91d857b2e523b16d35778"; - //const [orderData, setOrderData] = useState([]); - //co nsole.log(API_BASE_URL+"/order/"+location); - fetch(API_BASE_URL+"/order/"+location) - .then(response => response.json()) - .then(orderData => setOrderData(orderData)); - return orderData; - } - - function fetchOrderByBrand(brand:string){ - brand = brand.split(' ').join(''); - //const [orderData, setOrderData] = useState([]); - fetch(API_BASE_URL+"/order/"+brand) - .then(response => response.json()) - .then(orderData => setOrderData(orderData)); - //co nsole.log(API_BASE_URL+"/order/"+brand); - return orderData; - } - function fetchOrderByDate(month:number, year:number){ - const [orderData, setOrderData] = useState([]); - fetch(API_BASE_URL+"/order/"+month+"-"+year) - .then(response => response.json()) - .then(orderData => setOrderData(orderData)); - return orderData; - } @@ -899,138 +856,6 @@ export default function Dashboard() { ]; - const FAKE_DATA = [ - { - "_id": "65d91d857b2e523b16d35777", - "name": "Attentive Aashita", - "age": 25, - "region": "Elgin", - "pets": [ - { - "isActive": true, - "animal": "large dog", - "vet": true, - "food": "HEB Texhas Pets", - "lbs": 8 - }, - { - "isActive": true, - "animal": "small dog", - "vet": true, - "food": "HEB Texas Pets", - "lbs": 8 - } - ] - }, - { - "_id": "65d91d857b2e523b16d35778", - "name": "Magnificent Michelle", - "age": 25, - "region": "Lockhart", - "pets": [ - { - "isActive": false, - "animal": "small dog", - "vet": true, - "food": "Friskies", - "lbs": 5 - }, - { - "isActive": true, - "animal": "cat", - "vet": false, - "food": "Wholesomes", - "lbs": 2 - } - ] - }, - { - "_id": "65d91d857b2e523b16d35779", - "name": "Awesome Ayah", - "age": 22, - "region": "McMahan", - "pets": [] - }, - { - "_id": "65d91d857b2e523b16d3577a", - "name": "Amazing Alisha", - "age": 24, - "region": "Trinity Lutheran", - "pets": [] - }, - { - "_id": "65d91d857b2e523b16d3577b", - "name": "Phenomenal Pavan", - "age": 25, - "region": "Camine", - "pets": [ - { - "isActive": true, - "animal": "small dog", - "vet": true, - "food": "Friskies", - "lbs": 5 - }, - { - "isActive": false, - "animal": "cat", - "vet": false, - "food": "Nutrena", - "lbs": 2 - } - ] - }, - { - "_id": "65d91d857b2e523b16d3577c", - "name": "Intricate Ismaeel", - "age": 25, - "region": "Camine", - "pets": [] - }, - { - "_id": "65d91d857b2e523b16d3577d", - "name": "Jolly Joanne", - "age": 31, - "region": "Lockhart", - "pets": [] - }, - { - "_id": "65d91d857b2e523b16d3577e", - "name": "Superb Sai", - "age": 28, - "region": "McMahan", - "pets": [] - }, - { - "_id": "65d91d857b2e523b16d3577f", - "name": "Magical Mi Lan", - "age": 38, - "region": "Trinity Lutheran", - "pets": [] - }, - { - "_id": "65d91d857b2e523b16d35780", - "name": "Observant Omri", - "age": 31, - "region": "Flatonia", - "pets": [] - }, - { - "_id": "65d91d857b2e523b16d35781", - "name": "Meticulous Matthew", - "age": 420, - "region": "Trinity Lutheran", - "pets": [] - }, - { - "_id": "65d91d857b2e523b16d35782", - "name": "Terrific Tiffany", - "age": 90, - "region": "Elgin", - "pets": [] - } - ]; - diff --git a/frontend/src/components/home/InfoCard.tsx b/frontend/src/components/home/InfoCard.tsx index 596ebe5..c101f11 100644 --- a/frontend/src/components/home/InfoCard.tsx +++ b/frontend/src/components/home/InfoCard.tsx @@ -23,7 +23,7 @@ export const InfoCard: FC = ({ {description ? ( <>
- + icon
= ({ {title}
- + icon
)}