From 34dce13143f85d8be499a74db568e5b23dad60a3 Mon Sep 17 00:00:00 2001 From: towfiqi Date: Fri, 8 Nov 2024 12:29:24 +0600 Subject: [PATCH] style: updates merged PR formatting --- components/insight/InsightStats.tsx | 4 ++-- components/keywords/Keyword.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/insight/InsightStats.tsx b/components/insight/InsightStats.tsx index 225f97e..ed047fb 100644 --- a/components/insight/InsightStats.tsx +++ b/components/insight/InsightStats.tsx @@ -21,10 +21,10 @@ const InsightStats = ({ stats = [], totalKeywords = 0, totalPages = 0 }:InsightS position: item.position + acc.position, }; }, { impressions: 0, clicks: 0, position: 0 }); - + return { ...totals, - ctr: totals.impressions > 0 ? (totals.clicks / totals.impressions) * 100 : 0 + ctr: totals.impressions > 0 ? (totals.clicks / totals.impressions) * 100 : 0, }; }, [stats]); diff --git a/components/keywords/Keyword.tsx b/components/keywords/Keyword.tsx index 2dec794..23eb89c 100644 --- a/components/keywords/Keyword.tsx +++ b/components/keywords/Keyword.tsx @@ -73,7 +73,7 @@ const Keyword = (props: KeywordProps) => { let bestPos; if (Object.keys(history).length > 0) { const historyArray = Object.keys(history).map((itemID) => ({ date: itemID, position: history[itemID] })) - .sort((a, b) => a.position - b.position).filter((el) => (el.position > 0));; + .sort((a, b) => a.position - b.position).filter((el) => (el.position > 0)); if (historyArray[0]) { bestPos = { ...historyArray[0] }; }