mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-01 12:29:10 +00:00
Extract client timeuntil logic (#1521)
* extract * add to timeline * translate Due * fix timeline page * begin adding some tests * spelling Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com> * move file * refactor * create hook * refactor * update test * spelling Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com> * remove translation * explain isLinkedToLoaded * add delay to calculation * add delay value to test * spelling --------- Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
b60b1beeec
commit
99dd4b4d5c
@@ -51,6 +51,7 @@ interface EventBlockProps {
|
||||
isNextDay: boolean;
|
||||
dayOffset: number;
|
||||
totalGap: number;
|
||||
isLinkedToLoaded: boolean;
|
||||
actionHandler: (
|
||||
action: EventItemActions,
|
||||
payload?:
|
||||
@@ -91,6 +92,7 @@ export default function EventBlock(props: EventBlockProps) {
|
||||
isNextDay,
|
||||
dayOffset,
|
||||
totalGap,
|
||||
isLinkedToLoaded,
|
||||
actionHandler,
|
||||
} = props;
|
||||
const { selectedEventId, setSelectedEventId, clearSelectedEventId } = useEventIdSwapping();
|
||||
@@ -310,6 +312,7 @@ export default function EventBlock(props: EventBlockProps) {
|
||||
dayOffset={dayOffset}
|
||||
isPast={isPast}
|
||||
totalGap={totalGap}
|
||||
isLinkedToLoaded={isLinkedToLoaded}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user