This commit is contained in:
NotII
2025-03-06 13:00:07 +00:00
parent bc9f8ebbf9
commit 308bcc13fa
3 changed files with 43 additions and 25 deletions

View File

@@ -32,7 +32,8 @@ export default function StockManagementPage() {
const fetchDataAsync = async () => {
try {
const fetchedProducts = await fetchProductData("/api/products", authToken);
const apiUrl = `${process.env.NEXT_PUBLIC_API_URL}/products`;
const fetchedProducts = await fetchProductData(apiUrl, authToken);
setProducts(fetchedProducts);
// Initialize stock values