mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-18 21:54:09 +00:00
refactor: remove unused and legacy code
- remove legacy migrations - remove unused server code - remove unused UI code
This commit is contained in:
committed by
Carlos Valente
parent
fe8bbd5003
commit
95f2ba37cc
@@ -12,7 +12,7 @@ interface SectionProps {
|
||||
|
||||
export default memo(Section);
|
||||
|
||||
export function Section(props: SectionProps) {
|
||||
function Section(props: SectionProps) {
|
||||
const { category, content, title, status } = props;
|
||||
|
||||
const sectionClasses = cx(['section', category === 'now' && 'section--now']);
|
||||
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
MILLIS_PER_HOUR,
|
||||
} from 'ontime-utils';
|
||||
|
||||
import { clamp } from '../../common/utils/math';
|
||||
import { formatDuration } from '../../common/utils/time';
|
||||
import { isStringBoolean } from '../../features/viewers/common/viewUtils';
|
||||
|
||||
@@ -22,13 +21,6 @@ type CSSPosition = {
|
||||
width: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Calculates the position (in %) of an element relative to a schedule
|
||||
*/
|
||||
export function getRelativePositionX(scheduleStart: number, scheduleEnd: number, now: number): number {
|
||||
return clamp(((now - scheduleStart) / (scheduleEnd - scheduleStart)) * 100, 0, 100);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates an absolute position of an element based on a schedule
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user