mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-09 17:33:55 +00:00
Refactor imports
* refactor: implement import lint
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import SocketProvider from 'app/context/socketContext';
|
||||
|
||||
import MessageControl from '../message/MessageControl';
|
||||
|
||||
// need to inject the socket provider to make component
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import SocketProvider from 'app/context/socketContext';
|
||||
|
||||
import PlaybackControl from '../playback/PlaybackControl';
|
||||
|
||||
test('check that playback control renders', async () => {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import React from 'react';
|
||||
import { IconButton } from '@chakra-ui/button';
|
||||
import { Editable, EditableInput, EditablePreview } from '@chakra-ui/editable';
|
||||
import { Tooltip } from '@chakra-ui/tooltip';
|
||||
import { IconButton } from '@chakra-ui/button';
|
||||
import { IoSunny } from '@react-icons/all-files/io5/IoSunny';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import style from './MessageControl.module.scss';
|
||||
|
||||
export default function InputRow(props) {
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
import { useSocket } from 'app/context/socketContext';
|
||||
import InputRow from './InputRow';
|
||||
import { Tooltip } from '@chakra-ui/tooltip';
|
||||
import { IconButton } from '@chakra-ui/button';
|
||||
import { IoMicSharp } from '@react-icons/all-files/io5/IoMicSharp';
|
||||
import { Tooltip } from '@chakra-ui/tooltip';
|
||||
import { IoMicOffOutline } from '@react-icons/all-files/io5/IoMicOffOutline';
|
||||
import { IoMicSharp } from '@react-icons/all-files/io5/IoMicSharp';
|
||||
import { useSocket } from 'app/context/socketContext';
|
||||
|
||||
import InputRow from './InputRow';
|
||||
|
||||
import style from './MessageControl.module.scss';
|
||||
|
||||
export default function MessageControl() {
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
import React from 'react';
|
||||
import { Box } from '@chakra-ui/layout';
|
||||
import ErrorBoundary from '../../../common/components/errorBoundary/ErrorBoundary';
|
||||
import MessageControl from './MessageControl';
|
||||
import style from '../../editors/Editor.module.scss';
|
||||
import { FiArrowUpRight } from '@react-icons/all-files/fi/FiArrowUpRight';
|
||||
|
||||
import ErrorBoundary from '../../../common/components/errorBoundary/ErrorBoundary';
|
||||
import { handleLinks } from '../../../common/utils/linkUtils';
|
||||
|
||||
import MessageControl from './MessageControl';
|
||||
|
||||
import style from '../../editors/Editor.module.scss';
|
||||
|
||||
export default function MessageControlExport() {
|
||||
return (
|
||||
<Box className={style.messages}>
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import React from 'react';
|
||||
import StartIconBtn from '../../../common/components/buttons/StartIconBtn';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import PauseIconBtn from '../../../common/components/buttons/PauseIconBtn';
|
||||
import RollIconBtn from '../../../common/components/buttons/RollIconBtn';
|
||||
import PropTypes from 'prop-types';
|
||||
import StartIconBtn from '../../../common/components/buttons/StartIconBtn';
|
||||
|
||||
import style from './PlaybackControl.module.scss';
|
||||
|
||||
export default function Playback(props) {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import React, { memo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Transport from './Transport';
|
||||
|
||||
import Playback from './Playback';
|
||||
import Transport from './Transport';
|
||||
|
||||
const areEqual = (prevProps, nextProps) => {
|
||||
return (
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
import style from './PlaybackControl.module.scss';
|
||||
import { useSocket } from 'app/context/socketContext';
|
||||
|
||||
import PlaybackButtons from './PlaybackButtons';
|
||||
import PlaybackTimer from './PlaybackTimer';
|
||||
|
||||
import style from './PlaybackControl.module.scss';
|
||||
|
||||
export default function PlaybackControl() {
|
||||
const socket = useSocket();
|
||||
const [playback, setPlayback] = useState(null);
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import React, { memo } from 'react';
|
||||
import Countdown from 'common/components/countdown/Countdown';
|
||||
import { Tooltip } from '@chakra-ui/react';
|
||||
import { Button } from '@chakra-ui/button';
|
||||
import { Tooltip } from '@chakra-ui/react';
|
||||
import Countdown from 'common/components/countdown/Countdown';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { stringFromMillis } from '../../../common/utils/time';
|
||||
|
||||
import style from './PlaybackControl.module.scss';
|
||||
|
||||
const areEqual = (prevProps, nextProps) => {
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
import React from 'react';
|
||||
import { Box } from '@chakra-ui/layout';
|
||||
import ErrorBoundary from '../../../common/components/errorBoundary/ErrorBoundary';
|
||||
import PlaybackControl from './PlaybackControl';
|
||||
import styles from '../../editors/Editor.module.scss';
|
||||
import style from '../../editors/Editor.module.scss';
|
||||
import { FiArrowUpRight } from '@react-icons/all-files/fi/FiArrowUpRight';
|
||||
|
||||
import ErrorBoundary from '../../../common/components/errorBoundary/ErrorBoundary';
|
||||
import { handleLinks } from '../../../common/utils/linkUtils';
|
||||
|
||||
import PlaybackControl from './PlaybackControl';
|
||||
|
||||
import style from '../../editors/Editor.module.scss';
|
||||
|
||||
export default function TimerControlExport() {
|
||||
return (
|
||||
<Box className={styles.playback}>
|
||||
<Box className={style.playback}>
|
||||
<h1>Timer Control</h1>
|
||||
<FiArrowUpRight className={style.corner} onClick={(event) => handleLinks(event, 'timercontrol')} />
|
||||
<div className={styles.content}>
|
||||
<div className={style.content}>
|
||||
<ErrorBoundary>
|
||||
<PlaybackControl />
|
||||
</ErrorBoundary>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import React from 'react';
|
||||
import { IoArrowUndo } from '@react-icons/all-files/io5/IoArrowUndo';
|
||||
import { IoPlaySkipBack } from '@react-icons/all-files/io5/IoPlaySkipBack';
|
||||
import { IoPlaySkipForward } from '@react-icons/all-files/io5/IoPlaySkipForward';
|
||||
import { IoArrowUndo } from '@react-icons/all-files/io5/IoArrowUndo';
|
||||
import UnloadIconBtn from '../../../common/components/buttons/UnloadIconBtn';
|
||||
import PropTypes from 'prop-types';
|
||||
import style from './PlaybackControl.module.scss';
|
||||
|
||||
import TransportIconBtn from '../../../common/components/buttons/TransportIconBtn';
|
||||
import UnloadIconBtn from '../../../common/components/buttons/UnloadIconBtn';
|
||||
|
||||
import style from './PlaybackControl.module.scss';
|
||||
|
||||
export default function Transport(props) {
|
||||
const { playback, selectedId, playbackControl, noEvents } = props;
|
||||
|
||||
Reference in New Issue
Block a user