From c9b23df46b9590791b2e55a711abf9baf3c4cae8 Mon Sep 17 00:00:00 2001 From: Sirttas Date: Thu, 27 Jul 2023 10:48:13 +0200 Subject: [PATCH] cleanup --- src/reprocess/ReprocessResultTable.vue | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/reprocess/ReprocessResultTable.vue b/src/reprocess/ReprocessResultTable.vue index e850aa9..a3aec1e 100644 --- a/src/reprocess/ReprocessResultTable.vue +++ b/src/reprocess/ReprocessResultTable.vue @@ -17,13 +17,11 @@ const props = withDefaults(defineProps(), { const threshold = useStorage('reprocess-threshold', 0); const useSellOrder = useStorage('reprocess-use-sell-order', false); -const { sortedArray, headerProps } = useSort(computed(() => { - return props.result.map(r =>({ - ...r, - buy_ratio: r.buy === 0 ? 1 : (r.buy_reprocess / r.buy) - 1, - sell_ratio: r.sell === 0 ? 1 : (r.sell_reprocess / r.sell) - 1 - })) -}), { +const { sortedArray, headerProps } = useSort(computed(() => props.result.map(r =>({ + ...r, + buy_ratio: r.buy === 0 ? 1 : (r.buy_reprocess / r.buy) - 1, + sell_ratio: r.sell === 0 ? 1 : (r.sell_reprocess / r.sell) - 1 +}))), { defaultSortKey: 'name', defaultSortDirection: 'asc' })