Skip to content

Commit fda703a

Browse files
committed
refactor: updated wakatime:getTimeWithRange view function
1 parent df70a13 commit fda703a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

platforms/wakatime/view/index.tsx

+10-8
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ export const getAllTimeSinceToday: ViewComponent = (result, config) => {
1414
export const getTimeWithRange: ViewComponent = (result, config) => {
1515
const subtitle = (config.queryConfig as any).range;
1616
const points = result.data.map((day: any) => day.grand_total.total_seconds);
17-
return (
18-
<Line
19-
leftTitle="Wakatime"
20-
leftSubtitle={subtitle}
21-
points={points}
22-
rightTitle={result.cumulative_total.text}
23-
/>
24-
);
17+
18+
const lines = [
19+
{
20+
leftTitle: "Line",
21+
leftSubtitle: subtitle,
22+
points,
23+
rightTitle: result.cumulative_total.text,
24+
},
25+
];
26+
return <Line items={lines} />;
2527
};
2628

2729
export const getMostUsedLanguages: ViewComponent = (result, config) => {

0 commit comments

Comments
 (0)