Skip to content
This repository was archived by the owner on Dec 26, 2022. It is now read-only.

Commit 431430b

Browse files
committed
Fix renaming
1 parent 3ad7295 commit 431430b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/helpers/ArrayHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function iterPrevCurrent<T, R = any>(
1313
}
1414
}
1515

16-
export function arrayHelper<T, R = any>(
16+
export function mapPrevCurrent<T, R = any>(
1717
items: T[],
1818
callback: CallbackPrev<T, R>
1919
): R[] {

src/screens/projects/components/HoursByTask/HoursByTask.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { observer } from 'mobx-react';
77
import { createUseStyles } from 'react-jss';
88

99
import TaskModel, { ITimeRangeModel } from '../../../../models/TaskModel';
10-
import { arrayHelpers } from '../../../../helpers/ArrayHelper';
10+
import { mapPrevCurrent } from '../../../../helpers/ArrayHelper';
1111
import HoursItem from './components/HoursItem';
1212
import IconTile from '../../../../components/IconTile/IconTile';
1313
import { calcDuration, msToTime } from '../../../../helpers/DateTime';
@@ -40,7 +40,7 @@ export default observer(function HoursByTask({
4040
<BellFilled style={{ color: 'white' }} />
4141
</IconTile>
4242
{task?.time.length === 0 && <div>No billed hours</div>}
43-
{arrayHelpers(task?.time || [], (prev, range, index) => {
43+
{mapPrevCurrent(task?.time || [], (prev, range, index) => {
4444
const hoursItem = (
4545
<HoursItem
4646
range={range}

0 commit comments

Comments
 (0)