From 81f6dec6e1ad54f2f24c0aa4c22e904e6ba23fe0 Mon Sep 17 00:00:00 2001 From: Quintine Date: Wed, 20 May 2026 13:59:43 +1000 Subject: [PATCH] Fix: Remove unused imports and variables to satisfy strict TypeScript build --- frontend/src/App.tsx | 2 +- frontend/src/components/AdminDashboard.tsx | 9 +-------- frontend/src/components/CartModal.tsx | 2 +- frontend/src/components/CustomerView.tsx | 1 - frontend/src/components/Icons.tsx | 1 - 5 files changed, 3 insertions(+), 12 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 31510f1..50bab6c 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import { API } from './services/api'; import { Icons } from './components/Icons'; import CustomerView from './components/CustomerView'; diff --git a/frontend/src/components/AdminDashboard.tsx b/frontend/src/components/AdminDashboard.tsx index 7661d3e..19621d2 100644 --- a/frontend/src/components/AdminDashboard.tsx +++ b/frontend/src/components/AdminDashboard.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import { Icons } from './Icons'; import { API } from '../services/api'; @@ -21,13 +21,6 @@ export default function AdminDashboard({ stock, orders, config, refreshData, not refreshData(); }; - const deleteOrder = (id: number) => { - promptConfirm("Delete this order record?", async () => { - await API.deleteOrder(id); - refreshData(); - notify("Order Deleted"); - }); - }; const addNewStockItem = async () => { const newItem = { diff --git a/frontend/src/components/CartModal.tsx b/frontend/src/components/CartModal.tsx index bc68a69..67857f2 100644 --- a/frontend/src/components/CartModal.tsx +++ b/frontend/src/components/CartModal.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Icons } from './Icons'; interface CartItem { diff --git a/frontend/src/components/CustomerView.tsx b/frontend/src/components/CustomerView.tsx index ba731c3..6b64e3a 100644 --- a/frontend/src/components/CustomerView.tsx +++ b/frontend/src/components/CustomerView.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Icons } from './Icons'; interface StockItem { diff --git a/frontend/src/components/Icons.tsx b/frontend/src/components/Icons.tsx index 87ab022..0b688be 100644 --- a/frontend/src/components/Icons.tsx +++ b/frontend/src/components/Icons.tsx @@ -1,4 +1,3 @@ -import React from 'react'; export const Icons = { Beast: () => ,