fixed build issues. its builds now

This commit is contained in:
2026-01-19 09:11:42 -05:00
parent b0db3167c5
commit 775a351425
17 changed files with 64 additions and 37 deletions
@@ -1,6 +1,6 @@
"use client";
import { useEffect, useState } from "react";
import { useCallback, useEffect, useState } from "react";
import { useApi } from "@/lib/useApi";
type Merchant = {
@@ -91,7 +91,7 @@ export default function MerchantCategoryMappingPage() {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
// 2) Load mappings when merchant changes (THIS sends merchantId)
useEffect(() => {
const loadMappings = useCallback(() => {
if (selectedMerchantId == null) return;
setLoadingMappings(true);
@@ -112,7 +112,11 @@ export default function MerchantCategoryMappingPage() {
);
})
.finally(() => setLoadingMappings(false));
}, [selectedMerchantId]);
}, [selectedMerchantId, get]);
useEffect(() => {
loadMappings();
}, [loadMappings]);
// 3) Save a single mapping row (adjust endpoint if yours differs)
const handleSaveMapping = async (