mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-18 13:44:12 +00:00
eslint
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { Heading } from '@chakra-ui/layout';
|
||||
import { Box } from '@chakra-ui/layout';
|
||||
import NumberedText from '../../common/components/text/NumberedText';
|
||||
import NumberedText from 'common/components/text/NumberedText';
|
||||
import PlaybackControl from '../control/PlaybackControl';
|
||||
import MessageControl from '../control/MessageControl';
|
||||
import styles from './Editor.module.css';
|
||||
import EventListWrapper from './list/EventListWrapper';
|
||||
import { useDisclosure } from '@chakra-ui/hooks';
|
||||
import SettingsModal from '../modals/SettingsModal';
|
||||
import SettingsIconBtn from '../../common/components/buttons/SettingsIconBtn';
|
||||
import SettingsIconBtn from 'common/components/buttons/SettingsIconBtn';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
export default function Editor() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Draggable } from 'react-beautiful-dnd';
|
||||
import { FiMoreVertical } from 'react-icons/fi';
|
||||
import DeleteIconBtn from '../../../common/components/buttons/DeleteIconBtn';
|
||||
import DeleteIconBtn from 'common/components/buttons/DeleteIconBtn';
|
||||
import ActionButtons from './ActionButtons';
|
||||
import style from './BlockBlock.module.css';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Draggable } from 'react-beautiful-dnd';
|
||||
import { FiMoreVertical } from 'react-icons/fi';
|
||||
import { millisToMinutes } from '../../../common/dateConfig';
|
||||
import { millisToMinutes } from 'common/dateConfig';
|
||||
import ActionButtons from './ActionButtons';
|
||||
import DeleteIconBtn from '../../../common/components/buttons/DeleteIconBtn';
|
||||
import ApplyIconBtn from '../../../common/components/buttons/ApplyIconBtn';
|
||||
import DelayInput from '../../../common/input/DelayInput';
|
||||
import DeleteIconBtn from 'common/components/buttons/DeleteIconBtn';
|
||||
import ApplyIconBtn from 'common/components/buttons/ApplyIconBtn';
|
||||
import DelayInput from 'common/input/DelayInput';
|
||||
import style from './DelayBlock.module.css';
|
||||
|
||||
export default function DelayBlock(props) {
|
||||
|
||||
@@ -2,13 +2,13 @@ import Icon from '@chakra-ui/icon';
|
||||
import { FiChevronDown, FiChevronUp, FiMoreVertical } from 'react-icons/fi';
|
||||
import { useState } from 'react';
|
||||
import { Draggable } from 'react-beautiful-dnd';
|
||||
import EventTimes from '../../../common/components/eventTimes/EventTimes';
|
||||
import EventTimesVertical from '../../../common/components/eventTimes/EventTimesVertical';
|
||||
import EditableText from '../../../common/input/EditableText';
|
||||
import EventTimes from 'common/components/eventTimes/EventTimes';
|
||||
import EventTimesVertical from 'common/components/eventTimes/EventTimesVertical';
|
||||
import EditableText from 'common/input/EditableText';
|
||||
import ActionButtons from './ActionButtons';
|
||||
import VisibleIconBtn from '../../../common/components/buttons/VisibleIconBtn';
|
||||
import DeleteIconBtn from '../../../common/components/buttons/DeleteIconBtn';
|
||||
import { millisToMinutes } from '../../../common/dateConfig';
|
||||
import VisibleIconBtn from 'common/components/buttons/VisibleIconBtn';
|
||||
import DeleteIconBtn from 'common/components/buttons/DeleteIconBtn';
|
||||
import { millisToMinutes } from 'common/dateConfig';
|
||||
import style from './EventBlock.module.css';
|
||||
|
||||
const ExpandedBlock = (props) => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import style from './List.module.css';
|
||||
import { Fragment, useEffect, useState } from 'react';
|
||||
import { useSocket } from '../../../app/context/socketContext';
|
||||
import { useSocket } from 'app/context/socketContext';
|
||||
import tinykeys from 'tinykeys';
|
||||
import Empty from '../../../common/state/Empty';
|
||||
import Empty from 'common/state/Empty';
|
||||
import EventListItem from './EventListItem';
|
||||
import { AnimatePresence, motion } from 'framer-motion';
|
||||
import { DragDropContext, Droppable } from 'react-beautiful-dnd';
|
||||
@@ -45,7 +45,7 @@ export default function EventList(props) {
|
||||
return () => {
|
||||
unsubscribe();
|
||||
};
|
||||
}, [cursor, events, eventsHandler]);
|
||||
}, [cursor, events.length, eventsHandler]);
|
||||
|
||||
// handle incoming messages
|
||||
useEffect(() => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import DelayBlock from './DelayBlock';
|
||||
import BlockBlock from './BlockBlock';
|
||||
import EventBlock from './EventBlock';
|
||||
import { showErrorToast } from '../../../common/helpers/toastManager';
|
||||
import { showErrorToast } from 'common/helpers/toastManager';
|
||||
import { memo } from 'react';
|
||||
|
||||
const areEqual = (prevProps, nextProps) => {
|
||||
|
||||
@@ -9,12 +9,12 @@ import {
|
||||
requestDelete,
|
||||
requestReorder,
|
||||
requestApplyDelay,
|
||||
} from '../../../app/api/eventsApi.js';
|
||||
} from 'app/api/eventsApi.js';
|
||||
import EventList from './EventList';
|
||||
import EventListMenu from '../../menu/EventListMenu.jsx';
|
||||
import { showErrorToast } from '../../../common/helpers/toastManager';
|
||||
import { useFetch } from '../../../app/hooks/useFetch.js';
|
||||
import Empty from '../../../common/state/Empty';
|
||||
import EventListMenu from 'features/menu/EventListMenu.jsx';
|
||||
import { showErrorToast } from 'common/helpers/toastManager';
|
||||
import { useFetch } from 'app/hooks/useFetch.js';
|
||||
import Empty from 'common/state/Empty';
|
||||
|
||||
export default function EventListWrapper() {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
export const sortByDate = (arr) => {
|
||||
const sorter = (a, b) => {
|
||||
return new Date(a.timeStart).getTime() - new Date(b.timeStart).getTime();
|
||||
};
|
||||
return arr.sort(sorter);
|
||||
};
|
||||
@@ -1,112 +0,0 @@
|
||||
import { Skeleton } from '@chakra-ui/skeleton';
|
||||
|
||||
import style from '../list/List.module.css';
|
||||
|
||||
export default function EventListSkeleton() {
|
||||
return (
|
||||
<div className={style.eventContainer}>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='1.2'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='1.6'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='2.0'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='2.4'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='2.8'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='3.2'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='3.6'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='4.0'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='4.4'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='4.0'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='3.6'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='3.2'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='2.8'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='2.4'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='2.0'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='1.6'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
<Skeleton
|
||||
height='4vh'
|
||||
speed='1.2'
|
||||
startColor='#333333'
|
||||
endColor='#202020'
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user