From fda703aeffb813a50503ea7f5a4a47da493b70f9 Mon Sep 17 00:00:00 2001 From: Samet Date: Sun, 23 Apr 2023 22:45:36 +0300 Subject: [PATCH] refactor: updated wakatime:getTimeWithRange view function --- platforms/wakatime/view/index.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/platforms/wakatime/view/index.tsx b/platforms/wakatime/view/index.tsx index f800db5..5db42a8 100644 --- a/platforms/wakatime/view/index.tsx +++ b/platforms/wakatime/view/index.tsx @@ -14,14 +14,16 @@ export const getAllTimeSinceToday: ViewComponent = (result, config) => { export const getTimeWithRange: ViewComponent = (result, config) => { const subtitle = (config.queryConfig as any).range; const points = result.data.map((day: any) => day.grand_total.total_seconds); - return ( - - ); + + const lines = [ + { + leftTitle: "Line", + leftSubtitle: subtitle, + points, + rightTitle: result.cumulative_total.text, + }, + ]; + return ; }; export const getMostUsedLanguages: ViewComponent = (result, config) => {