Skip to content

Commit

Permalink
Try coderabit suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
cohenaj194 authored Jul 15, 2024
1 parent 857d1ac commit 89d6f5d
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions app/routes/ffxiv.extended-history.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,7 @@ const FFXIVSaleHistory = () => {
};

useEffect(() => {
console.log('Action data results:', results);

if (results && results.entries) {
console.log('Setting item history with results:', results);
dispatch(setItemHistory(results));
} else if (results && results.exception) {
const message = parseServerError(results.exception);
Expand All @@ -130,21 +127,17 @@ const FFXIVSaleHistory = () => {
}
}, [results, dispatch]);

console.log('Item history:', itemHistory);

const resultTitle = itemHistory ? getItemNameById(itemHistory.payload.itemId) : null;

const handleFormChange = (selectValue?: ItemSelected | undefined) => {
if (error) {
setError(undefined);
}
setFormState(selectValue);
console.log('Form state changed:', selectValue);
};

const handleTextChange = () => {
setError(undefined);
console.log('Text input changed');
};

const formatDate = (timestamp: number) => {
Expand All @@ -154,7 +147,6 @@ const FFXIVSaleHistory = () => {

let tableData = [];
if (itemHistory?.entries) {
console.log('Entries found:', itemHistory.entries);
tableData = itemHistory.entries.map((entry) => ({
hq: entry.hq,
pricePerUnit: entry.pricePerUnit,
Expand All @@ -163,12 +155,8 @@ const FFXIVSaleHistory = () => {
onMannequin: entry.onMannequin,
timestamp: formatDate(entry.timestamp),
}));
} else {
console.log('No entries found or itemHistory is undefined');
}

console.log('Table data:', tableData);

const columnList = [
{ columnId: 'hq', header: 'HQ' },
{ columnId: 'pricePerUnit', header: 'Price Per Unit' },
Expand Down Expand Up @@ -222,5 +210,3 @@ const FFXIVSaleHistory = () => {
</PageWrapper>
);
};

export default FFXIVSaleHistory;

0 comments on commit 89d6f5d

Please sign in to comment.