refactor: type improvements (#751)

This commit is contained in:
Carlos Valente
2024-01-31 14:42:33 +01:00
committed by GitHub
parent 7eb9ee8d03
commit cf08bfc796
17 changed files with 48 additions and 37 deletions
@@ -23,7 +23,7 @@ class ErrorBoundary extends React.Component {
componentDidCatch(error, info) {
this.setState({
error: error,
error,
errorInfo: info,
});
@@ -12,7 +12,7 @@ import {
useDisclosure,
} from '@chakra-ui/react';
import { useLocalStorage } from '../../../common/hooks/useLocalStorage';
import { useLocalStorage } from '../../hooks/useLocalStorage';
import ParamInput from './ParamInput';
import { ParamField } from './types';
@@ -7,7 +7,7 @@ import { IoTrashOutline } from '@react-icons/all-files/io5/IoTrashOutline';
import { SupportedEvent } from 'ontime-types';
import { useEventAction } from '../../common/hooks/useEventAction';
import { useEventSelection } from '../../features/rundown/useEventSelection';
import { useEventSelection } from '../rundown/useEventSelection';
const RundownMenu = ({ children }: { children: ReactNode }) => {
const { clearSelectedEvents } = useEventSelection();
@@ -52,7 +52,7 @@ export default function Operator() {
const scrollRef = useRef<HTMLDivElement | null>(null);
const scrollToComponent = useFollowComponent({
followRef: selectedRef,
scrollRef: scrollRef,
scrollRef,
doFollow: !lockAutoScroll,
topOffset: selectedOffset,
});
@@ -44,7 +44,7 @@ export const useEventSelection = create<EventSelectionStore>()((set, get) => ({
selectedEvents.delete(id);
return set({
selectedEvents: selectedEvents,
selectedEvents,
anchoredIndex: newAnchoredIndex?.index ?? 0,
});
}